:root {
    /* Rose Gold Theme */
    --primary: #F43F5E;
    --primary-hover: #E11D48;
    --primary-glow: rgba(244, 63, 94, 0.3);

    --secondary: #FB7185;
    --accent: #2DD4BF;
    --accent-glow: rgba(45, 212, 191, 0.2);

    --bg-dark: #1A0A10;
    /* Deep warm dark */
    --bg-sidebar: #240F17;
    --bg-panel: #2B141E;
    --bg-input: #3A1C29;

    --text-main: #FFFFFF;
    --text-muted: #FCA5A5;
    /* Soft rose tint */
    --text-dark: #4C0519;
    /* Deep red for contrast on light BGs */

    --border: rgba(251, 113, 133, 0.15);
    --border-focus: rgba(244, 63, 94, 0.6);

    --success: #10B981;
    --warning: #F59E0B;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.sidebar-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: 10px;
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.best-practices-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.best-practices-list li {
    background: var(--bg-panel);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.best-practices-list li strong {
    display: block;
    color: white;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.mt-6 {
    margin-top: 2rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Favorites List */
.favorites-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.favorite-item {
    background: var(--bg-input);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.favorite-item:hover {
    border-color: var(--primary);
    background: rgba(244, 63, 94, 0.1);
}

.favorite-text {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 180px;
}

.delete-fav {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.delete-fav:hover {
    color: var(--primary);
}

/* Main Workspace */
.workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    padding: 2rem 2.5rem 1rem 2.5rem;
}

.topbar h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.generator-container {
    display: flex;
    flex-grow: 1;
    padding: 1rem 2.5rem 2.5rem 2.5rem;
    gap: 2rem;
    overflow: hidden;
}

.panel {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.panel::-webkit-scrollbar {
    width: 6px;
}

.panel::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: 10px;
}

.config-panel {
    max-width: 500px;
}

.config-panel h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Forms */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.half {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.modern-select,
.modern-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: white;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}

.modern-input {
    resize: vertical;
    min-height: 80px;
}

.modern-select:focus,
.modern-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Pills */
.pill-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover {
    background: rgba(251, 113, 133, 0.1);
    color: white;
}

.pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Slider */
.slider-container {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.slider-label strong {
    color: white;
}

.modern-slider {
    width: 100%;
    accent-color: var(--primary);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(1px);
}

.full-width {
    width: 100%;
}

.sparkle {
    width: 18px;
    height: 18px;
}

.sm-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--secondary);
}

.outline-btn:hover {
    background: rgba(251, 113, 133, 0.1);
    color: white;
}

/* Output Panel */
.state-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.icon-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.05);
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.brand-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.state-view h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.state-view p {
    max-width: 300px;
    line-height: 1.5;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-input);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Results */
.results-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.results-header h3 {
    font-size: 1.25rem;
}

.comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.variant-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
}

.variant-label {
    position: absolute;
    top: -10px;
    left: 1.5rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.copy-display {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.copy-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

/* If it's a button context, style like a CTA */
.variant-card[data-context="button"] .copy-text {
    background: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Analysis Metrics */
.metrics-section {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.metric-val.warn {
    color: var(--warning);
}

.a11y-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: var(--bg-dark);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}