:root {
    /* Palette */
    --space-indigo: #2B2D42;
    --lavender-grey: #8D99AE;
    --platinum: #EDF2F4;
    --punch-red: #EF233C;
    --flag-red: #D90429;
    --white: #FFFFFF;

    /* Shadows & Effects */
    --shadow-soft: 0 20px 40px -10px rgba(43, 45, 66, 0.15);
    --shadow-hover: 0 25px 50px -12px rgba(43, 45, 66, 0.25);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);

    /* Radius */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--platinum);
    color: var(--space-indigo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

/* Nav */
.top-nav {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--space-indigo);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
    opacity: 0.7;
}

.nav-link:hover {
    background-color: rgba(43, 45, 66, 0.05);
    opacity: 1;
    transform: translateY(-1px);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
    color: var(--space-indigo);
}

.highlight {
    color: var(--punch-red);
}

.subtitle {
    color: var(--lavender-grey);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Card */
.main-container {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glass-card {
    background: var(--white);
    width: 100%;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 1);
    position: relative;
    overflow: hidden;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--space-indigo);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label i {
    color: var(--punch-red);
}

.textarea-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    background-color: #F8F9FA;
    transition: var(--transition);
    border: 2px solid transparent;
}

.textarea-wrapper:focus-within {
    background-color: var(--white);
    border-color: var(--flag-red);
    /* Using Flag Red for active border for better contrast? Or Punch Red */
    border-color: rgba(239, 35, 60, 0.3);
    box-shadow: 0 0 0 4px rgba(239, 35, 60, 0.1);
}

textarea {
    width: 100%;
    border: none;
    background: transparent;
    padding: 1.5rem;
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--space-indigo);
    resize: none;
    outline: none;
    min-height: 160px;
    line-height: 1.6;
}

textarea::placeholder {
    color: var(--lavender-grey);
}

textarea#output {
    font-family: 'Inter', sans-serif;
    /* Monospace is optional, lets keep clean sans */
    font-size: 1rem;
    min-height: 250px;
    color: #4A4E69;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    /* Slightly rounded, modern 2026 feel */
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background-color: var(--punch-red);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(239, 35, 60, 0.4);
}

.btn-primary:hover {
    background-color: var(--flag-red);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(239, 35, 60, 0.5);
}

.btn-secondary {
    background-color: var(--space-indigo);
    color: white;
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(43, 45, 66, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--lavender-grey);
}

.btn-ghost:hover {
    color: var(--flag-red);
    background: rgba(239, 35, 60, 0.05);
}

.btn-primary.success,
.btn-secondary.success {
    background-color: #2a9d8f;
    /* Temporary Success Green */
    box-shadow: 0 10px 20px -5px rgba(42, 157, 143, 0.4);
}

/* Actions */
.action-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-row .btn-primary {
    flex: 2;
}

.action-row .btn-ghost {
    flex: 1;
}

/* Separator */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--lavender-grey);
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E0E4E8;
}

.separator-text {
    padding: 0 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Output Wrapper specific */
.output-wrapper {
    position: relative;
    background-color: #F0F4F8;
    /* Slightly distinct for output */
}

.btn-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--space-indigo);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--punch-red);
    transform: scale(1.05);
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding-bottom: 2rem;
}

.footer-link {
    color: var(--lavender-grey);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--punch-red);
}

/* Responsive */
@media (max-width: 600px) {
    .main-title {
        font-size: 2.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .action-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 1.2rem;
    }

    .top-nav {
        display: none;
        /* Simplify on mobile or turn into hamburger? Let's hide for simplicity or scroll */
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        width: 100vw;
        padding: 1rem;
        border-radius: 0;
    }
}