:root {
    /* Brand Colors - Ice Blue Palette */
    --primary: #74B9FF;
    /* Ice Blue */
    --primary-hover: #5DA5EB;
    --secondary: #DFE6E9;
    /* Soft Light Gray */
    --accent: #E17055;
    /* Warm Coral/Orange */

    /* Backgrounds */
    --bg-dark: #0A121A;
    /* Deep Midnight Blue */
    --bg-panel: rgba(16, 28, 40, 0.75);
    --bg-input: rgba(0, 0, 0, 0.3);

    /* Text */
    --text-primary: #F8FAFC;
    --text-secondary: #DFE6E9;
    --text-muted: #829AB1;

    /* Syntax Highlighting CSS */
    --syn-property: #74B9FF;
    --syn-value: #A3E4D7;
    --syn-selector: #F1948A;
    --syn-media: #C39BD3;
    --syn-comment: #627D98;

    /* UI Elements */
    --border: rgba(116, 185, 255, 0.15);
    --border-focus: rgba(116, 185, 255, 0.5);
    --radius: 12px;
    --transition: 250ms ease;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    /* Ambient gradient background */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(116, 185, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(225, 112, 85, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Glassmorphism */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #00CEC9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hidden {
    display: none !important;
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100vh;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    color: var(--primary);
}

.app-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toggles */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    transition: .4s;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: var(--bg-dark);
}

.label-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Workspace Panels */
.workspace {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1rem;
}

/* Divider */
.divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
}

.divider-icon {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 20px rgba(116, 185, 255, 0.2);
}

/* Editors */
.code-editor,
.code-container {
    flex: 1;
    width: 100%;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1.25rem;
    color: var(--text-primary);
    outline: none;
    resize: none;
    transition: var(--transition);
}

.code-editor:focus {
    border-color: var(--border-focus);
    background: rgba(0, 0, 0, 0.4);
}

.code-editor::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.code-container {
    overflow-y: auto;
    overflow-x: auto;
    margin: 0;
}

.code-container pre {
    margin: 0;
}

.class-name-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 150px;
    outline: none;
}

.class-name-input:focus {
    border-color: var(--primary);
}

/* Suggestions */
.suggestions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.suggestions-bar span {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.primary-btn {
    background: var(--primary);
    color: #000;
}

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

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.glass-btn:hover {
    background: rgba(116, 185, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.text-btn {
    background: transparent;
    color: var(--text-muted);
}

.text-btn:hover {
    color: var(--text-primary);
}

.sm-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

.unsupported-msg {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(225, 112, 85, 0.1);
    border: 1px solid rgba(225, 112, 85, 0.3);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

/* Syntax Highlighting */
.syn-selector {
    color: var(--syn-selector);
    font-weight: 600;
}

.syn-property {
    color: var(--syn-property);
}

.syn-value {
    color: var(--syn-value);
}

.syn-media {
    color: var(--syn-media);
    font-style: italic;
}

.syn-comment {
    color: var(--syn-comment);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1024px) {
    .workspace {
        flex-direction: column;
    }

    .divider {
        width: 100%;
        height: 40px;
        flex-direction: row;
    }

    .divider-icon {
        transform: rotate(90deg);
    }

    .app-container {
        height: auto;
        min-height: 100vh;
    }
}