/* Custom overrides for Bootstrap */
:root {
    /* Dark mode colors */
    --primary-color: #5b5fc7;
    --secondary-color: #7c3aed;
    --success-color: #34a853;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    
    /* Dark theme - inspired by xtract.framer.ai */
    --bg-dark: #0f0f1a;
    --bg-dark-secondary: #1a1a2e;
    --bg-dark-tertiary: #252541;
    --text-dark: #ffffff;
    --text-dark-secondary: #b8b8d1;
    --border-dark: #3a3a52;
    --accent-dark: #5b5fc7;
    
    /* Light theme */
    --bg-light: #ffffff;
    --bg-light-secondary: #f8f9fc;
    --bg-light-tertiary: #f0f2f8;
    --text-light: #1a1a2e;
    --text-light-secondary: #6b7280;
    --border-light: #e5e7eb;
    --accent-light: #5b5fc7;
}

body.dark-mode {
    color-scheme: dark;
}

body.light-mode {
    color-scheme: light;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 100px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styling */
body.dark-mode {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    color: var(--text-dark);
}

/* Light mode styling */
body.light-mode {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    color: var(--text-light);
}

/* App Header */
.app-header {
    text-align: center;
    margin-bottom: 100px;
    animation: slideDown 0.5s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 16px; */
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1600px;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
}

.header-left .header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    text-align: right;
}

.header-top-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.tutorial-link {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
}

body.dark-mode .tutorial-link {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border: 1px solid var(--border-dark);
}

body.light-mode .tutorial-link {
    background: var(--bg-light-secondary);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

.tutorial-link:hover {
    background: #e8e8e8;
    border-color: #999;
    text-decoration: none;
    color: inherit;
}

body.dark-mode .tutorial-link:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-dark);
}

body.light-mode .tutorial-link:hover {
    background: white;
    border-color: var(--accent-light);
}

.tutorial-link:active {
    transform: translateY(1px);
}

.theme-toggle-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

body.dark-mode .theme-toggle-btn {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border: 1px solid var(--border-dark);
}

body.light-mode .theme-toggle-btn {
    background: var(--bg-light-secondary);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

.theme-toggle-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

body.dark-mode .theme-toggle-btn:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-dark);
}

body.light-mode .theme-toggle-btn:hover {
    background: white;
    border-color: var(--accent-light);
}

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

.header-right-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-icon {
    font-size: 48px;
    line-height: 1;
}

.icon-container {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.json-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 12px;
    animation: jsonPulse 3s ease-in-out infinite;
}

body.light-mode .json-icon {
    background: linear-gradient(135deg, rgba(91, 95, 199, 0.1) 0%, rgba(91, 95, 199, 0.05) 100%);
    border: 2px solid var(--accent-light);
}

@keyframes jsonPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
    }
}

.json-bracket {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    line-height: 1;
}

body.light-mode .json-bracket {
    color: var(--accent-light);
}

.json-bracket.start {
    margin-left: -24px;
}
.json-bracket.end {
    margin-left: 24px;
}

.json-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.json-line {
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1px;
    width: 100%;
    animation: lineBlink 2.5s ease-in-out infinite;
}

body.light-mode .json-line {
    background: var(--accent-light);
}

.json-line:nth-child(2) {
    animation-delay: 0.2s;
}

.json-line:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes lineBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.palette-icons {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.palette-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    animation: paletteSlide 4.4s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.palette-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    animation-delay: 0s;
}

.palette-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation-delay: 0.35s;
}

.palette-3 {
    background: linear-gradient(135deg, #00D4FF 0%, #0099FF 100%);
    animation-delay: 0.7s;
}

@keyframes paletteSlide {
    0% {
        transform: translateX(-15px);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    35% {
        transform: translateX(0);
        opacity: 0.8;
    }
    50% {
        transform: translateX(0);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

@keyframes spotlightGlow {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7),
                    inset 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.5),
                    0 0 0 9999px rgba(0, 0, 0, 0.7),
                    inset 0 0 30px rgba(102, 126, 234, 0.5);
    }
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.header-subtitle {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .header-title {
    color: #ffffff;
}

body.light-mode .header-title {
    color: var(--text-light);
    text-shadow: none;
}

body.light-mode .header-subtitle {
    color: var(--text-light);
}

.header-description {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-weight: 400;
    text-align: left;
}

body.light-mode .header-description {
    color: var(--text-light-secondary);
}

.header-subheading {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    font-weight: 600;
    margin-top: 32px;
    text-align: left;
}

body.light-mode .header-subheading {
    color: var(--text-light);
}

.header-instruction {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-weight: 400;
}

body.light-mode .header-instruction {
    color: var(--text-light-secondary);
}

.header-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.header-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-btn-primary {
    background: white;
    color: #667eea;
}

.header-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #f5f5ff;
}

.header-btn-primary:active {
    transform: translateY(0);
}

.header-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

body.light-mode .header-btn-secondary {
    background: var(--bg-light-tertiary);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

.header-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

body.light-mode .header-btn-secondary:hover {
    background: white;
    border-color: var(--accent-light);
}

.header-btn-secondary:active {
    transform: translateY(0);
}

.header-btn-zip {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.2);
}

.header-btn-zip:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(245, 87, 108, 0.3);
}

.header-btn-zip:active {
    transform: translateY(0);
}

/* Quick Start Section */
.quick-start-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

body.dark-mode .quick-start-section {
    background: var(--bg-dark-tertiary);
    border: 1px solid var(--border-dark);
}

body.light-mode .quick-start-section {
    background: var(--bg-light-secondary);
    border: 1px solid var(--border-light);
}

.quick-start-instruction {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.light-mode .quick-start-instruction {
    color: var(--text-light-secondary);
}

.quick-start-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-start-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* PRIMARY ACTION: Upload Tokens */
.quick-start-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    padding: 12px 16px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: 2px solid transparent;
}

.quick-start-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.quick-start-btn-primary:active {
    transform: translateY(0);
}

/* SECONDARY ACTION: Load Example */
.quick-start-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 500;
    font-size: 12px;
}

body.light-mode .quick-start-btn-secondary {
    background: transparent;
    color: var(--text-light-secondary);
    border: 1px solid var(--border-light);
}

.quick-start-btn-secondary:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

body.light-mode .quick-start-btn-secondary:hover {
    background: var(--bg-light-tertiary);
    border-color: var(--accent-light);
    color: var(--text-light);
}

.quick-start-btn-secondary:active {
    transform: translateY(0);
}

/* TERTIARY ACTION: Upload Project (ZIP) */
.quick-start-btn-zip {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 12px rgba(245, 87, 108, 0.35);
}

.quick-start-btn-zip:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(245, 87, 108, 0.45);
}

.quick-start-btn-zip:active {
    transform: translateY(0);
}

/* 2-Column Layout */
.main-layout {
    display: grid;
    grid-template-columns: 0.85fr 0.85fr 0.65fr;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 40px);
    /* overflow-y: auto; */
    /* padding-right: 10px; */
}

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

.column::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.column::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.column::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

h2 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    /* border-bottom: 2px solid var(--primary-color); */
    display: block;
    font-weight: 600;
}

body.dark-mode h2 {
    color: var(--text-dark);
}

body.light-mode h2 {
    color: var(--text-light);
}

/* Section Styling */
section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

body.dark-mode section {
    background: var(--bg-dark-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
}

body.light-mode section {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

.section-content {
    flex: 1;
    /* overflow-y: auto; */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Input Section */
.input-section {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 100%;
}

body.dark-mode .input-section {
    background: var(--bg-dark-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
}

body.light-mode .input-section {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

/* Input Section Header */
.input-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.input-section-header h2 {
    margin: 0;
    flex: 1;
}

.input-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-header-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Input Section Instruction */
.input-section-instruction {
    margin-bottom: 20px;
    display: none
}

.input-section-instruction p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    /* text-transform: uppercase; */
    letter-spacing: 0.3px;
    font-weight: 500;
    text-align: right;
}

body.light-mode .input-section-instruction p {
    color: var(--text-light-secondary);
}

.textarea-container {
    /* display: grid; */
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    /* height: 530px; */
    display: flex;
    flex-direction: column;
}

.textarea-wrapper {
    display: flex;
    flex-direction: column;
    /* height: 100%; */
    min-height: 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

body.dark-mode .textarea-wrapper {
    background: var(--bg-dark-tertiary);
    border: 1px solid var(--border-dark);
}

body.light-mode .textarea-wrapper {
    background: var(--bg-light-secondary);
    border: 1px solid var(--border-light);
}

.label-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.textarea-wrapper label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

body.dark-mode .textarea-wrapper label {
    color: var(--text-dark);
}

body.light-mode .textarea-wrapper label {
    color: var(--text-light);
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin-left: 8px;
    transition: background 0.3s ease;
}

.status-indicator.valid {
    background: #4caf50;
}

.status-indicator.invalid {
    background: #f44336;
}

/* CodeMirror Editor Styling */
.code-editor {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 0;
    overflow: hidden;
}

body.dark-mode .code-editor {
    border: 2px solid var(--border-dark);
}

body.light-mode .code-editor {
    border: 2px solid var(--border-light);
}

.CodeMirror {
    height: 140px;
    font-family: 'Courier New', monospace !important;
    font-size: 13px !important;
    border-radius: 6px;
    background: white !important;
    color: #333 !important;
}

body.dark-mode .CodeMirror {
    background: var(--bg-dark-tertiary) !important;
    color: var(--text-dark) !important;
}

body.light-mode .CodeMirror {
    background: var(--bg-light) !important;
    color: #1a1a2e !important;
}

body.light-mode .CodeMirror-code {
    color: #1a1a2e !important;
}

body.light-mode .cm-string {
    color: #2d7e2d !important;
}

body.light-mode .cm-property {
    color: #5b4d99 !important;
}

body.light-mode .cm-number {
    color: #d97706 !important;
}

body.light-mode .cm-atom {
    color: #5b4d99 !important;
}

body.light-mode .cm-null {
    color: #5b4d99 !important;
}

body.light-mode .cm-true,
body.light-mode .cm-false {
    color: #5b4d99 !important;
}

body.light-mode .cm-key {
    color: #5b4d99 !important;
}

.CodeMirror-gutters {
    background-color: #f5f5f5;
    border-right: 1px solid #e0e0e0;
}

body.dark-mode .CodeMirror-gutters {
    background-color: var(--bg-dark-secondary);
    border-right: 1px solid var(--border-dark);
}

body.light-mode .CodeMirror-gutters {
    background-color: var(--bg-light-secondary);
    border-right: 1px solid var(--border-light);
}

.CodeMirror-linenumber {
    color: #999;
}

body.dark-mode .CodeMirror-linenumber {
    color: var(--text-dark-secondary);
}

body.light-mode .CodeMirror-linenumber {
    color: var(--text-light-secondary);
}

.CodeMirror-cursor {
    border-left: 1px solid var(--primary-color);
}

.code-editor:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-info {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    min-height: 18px;
    flex-shrink: 0;
}

body.dark-mode .file-info {
    color: var(--text-dark-secondary);
}

body.light-mode .file-info {
    color: var(--text-light-secondary);
}

.file-info.error {
    color: #f44336;
}

.editor-actions {
    /* display: flex; */
    gap: 8px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.file-upload-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

body.dark-mode .file-upload-btn {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border: 1px solid var(--border-dark);
}

body.light-mode .file-upload-btn {
    /* background: var(--bg-light-secondary);
    color: var(--text-light);
    border: 1px solid var(--border-light); */
}

.file-upload-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

body.dark-mode .file-upload-btn:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-dark);
}

body.light-mode .file-upload-btn:hover {
    background: white;
    border-color: var(--accent-light);
}

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

.file-upload-btn-zip {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 3px 12px rgba(245, 87, 108, 0.35);
    min-width: 160px;
}

body.dark-mode .file-upload-btn-zip {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

body.light-mode .file-upload-btn-zip {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.file-upload-btn-zip:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(245, 87, 108, 0.45);
}

.file-upload-btn-zip:active {
    transform: translateY(0);
}

/* Theme Management Section - Removed, moved to inline with $themes.json */

.theme-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    flex-wrap: nowrap;
}

.add-theme-button {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
}

.add-theme-button:hover:not(:disabled) {
    background: #e8e8e8;
    border-color: #999;
}

.add-theme-button:active:not(:disabled) {
    transform: translateY(1px);
}

.add-theme-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.themes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-top: 8px;
}

.download-themes-icon-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 6px 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.download-themes-icon-btn:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

.download-themes-icon-btn:active {
    transform: translateY(0);
}

.themes-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.themes-list {
    display: flex;
    gap: 0;
    flex-direction: column;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

body.dark-mode .themes-list {
    border: 1px solid var(--border-dark);
    background: var(--bg-dark-tertiary);
}

body.light-mode .themes-list {
    border: 1px solid var(--border-light);
    background: var(--bg-light-secondary);
}

.themes-list::-webkit-scrollbar {
    width: 6px;
}

.themes-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 8px;
}

.themes-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 8px;
}

.themes-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.theme-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: white;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-left: 3px solid white;
    padding-left: 11px;
}

body.dark-mode .theme-badge {
    background: var(--bg-dark-secondary);
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-dark);
}

body.light-mode .theme-badge {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-light);
}

.theme-badge:last-child {
    border-bottom: none;
}

.theme-badge:hover {
    background: #f0f7ff;
    border-left: 3px solid var(--primary-color);
    padding-left: 11px;
    box-shadow: inset 1px 0 0 var(--primary-color);
}

.theme-badge-remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.theme-badge-remove:hover {
    opacity: 1;
}

.theme-badge-count {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    white-space: nowrap;
}

.themes-text-area {
    display: none;
}

/* Platform Configuration Section */
.platform-config-section {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 100%;
}

body.dark-mode .platform-config-section {
    background: var(--bg-dark-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
}

body.light-mode .platform-config-section {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

.platform-config-section h2 {
    margin: 0;
}

.platform-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.platform-header-container h2 {
    margin: 0;
}

.platforms-toggles {
    display: flex;
    gap: 12px;
    align-items: center;
}

.platform-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
}

.platform-toggle-btn:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.platform-toggle-btn input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
    margin: 0;
}

.platform-toggle-btn.active {
    background: #f0f7ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.platforms-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.platform-item {
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

body.dark-mode .platform-item {
    background: var(--bg-dark-tertiary);
    border: 1px solid var(--border-dark);
}

body.light-mode .platform-item {
    background: var(--bg-light-secondary);
    border: 1px solid var(--border-light);
}

.platform-item.hidden {
    display: none;
}

/* Ensure single visible platform takes full width */
.platforms-list > .platform-item:not(.hidden):only-of-type {
    grid-column: 1 / -1;
}

.platform-item:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.platform-item-header {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .platform-item-header {
    color: var(--text-dark);
}

body.light-mode .platform-item-header {
    color: var(--text-light);
}

.platform-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.platform-config-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.platform-config-item label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .platform-config-item label {
    color: var(--text-dark-secondary);
}

body.light-mode .platform-config-item label {
    color: var(--text-light-secondary);
}

.platform-config-item input {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    background: white;
    color: #333;
}

body.dark-mode .platform-config-item input {
    background: var(--bg-dark-tertiary);
    border: 1px solid var(--border-dark);
    color: var(--text-dark);
}

body.light-mode .platform-config-item input {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-light);
}

.platform-config-item select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-mode .platform-config-item select {
    background: var(--bg-dark-tertiary);
    border: 1px solid var(--border-dark);
    color: var(--text-dark);
}

body.light-mode .platform-config-item select {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-light);
}

.platform-config-item input:focus,
.platform-config-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #f0f7ff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Theme Modal */
.theme-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.theme-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.theme-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

body.dark-mode .theme-modal-content {
    background-color: var(--bg-dark-secondary);
    color: var(--text-dark);
}

.theme-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8e8f0;
}

body.dark-mode .theme-modal-header {
    border-bottom: 1px solid var(--border-dark);
}

body.light-mode .theme-modal-header {
    border-bottom: 1px solid #e8e8f0;
}

.theme-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

body.dark-mode .theme-modal-header h3 {
    color: var(--text-dark);
}

body.light-mode .theme-modal-header h3 {
    color: var(--text-light);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #333;
}

.theme-modal-body {
    padding: 20px;
}

body.dark-mode .theme-modal-body {
    background: var(--bg-dark-secondary);
}

body.light-mode .theme-modal-body {
    background: var(--bg-light);
}

.validation-message {
    padding: 10px 12px;
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validation-message::before {
    content: '⚠️';
    flex-shrink: 0;
}

.field-error {
    margin-top: 6px;
    padding: 8px 10px;
    color: #dc3545;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-error::before {
    content: '❌';
    flex-shrink: 0;
}

#theme-name-input.error {
    border-color: #dc3545;
    color: #dc3545;
}

.token-sets-list.error {
    border-color: #dc3545;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

#theme-name-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

#theme-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.token-sets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e8e8f0;
    border-radius: 6px;
    background: #fafafa;
}

.token-set-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.token-set-checkbox:hover {
    background: white;
}

.token-set-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.token-set-checkbox label {
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
}

.theme-modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e8e8f0;
    justify-content: flex-end;
}

.cancel-button {
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-button:hover {
    background: #e8e8f0;
    border-color: #d0d0d0;
}

.save-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.save-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.save-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Build Section */
.build-section {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .build-section {
    background: var(--bg-dark-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
}

body.light-mode .build-section {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

.build-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    border-color: #2563eb;
}

.build-button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.build-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.build-status {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
    border: 1px solid;
    font-size: 14px;
}

.build-status.loading {
    display: block;
    background: #e3f2fd;
    color: #1976d2;
    border-color: #1976d2;
}

body.dark-mode .build-status.loading {
    background: rgba(33, 150, 243, 0.15);
    color: #64b5f6;
    border-color: #42a5f5;
}

body.light-mode .build-status.loading {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #1976d2;
}

.build-status.success {
    display: block;
    background: #e8f5e9;
    color: #388e3c;
    border-color: #388e3c;
}

body.dark-mode .build-status.success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border-color: #66bb6a;
}

body.light-mode .build-status.success {
    background: #e8f5e9;
    color: #388e3c;
    border-color: #388e3c;
}

.build-status.error {
    display: block;
    background: #ffebee;
    color: #d32f2f;
    border-color: #d32f2f;
}

body.dark-mode .build-status.error {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
    border-color: #e53935;
}

body.light-mode .build-status.error {
    background: #ffebee;
    color: #d32f2f;
    border-color: #d32f2f;
}

/* Output Files Section */
.output-files-section {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .output-files-section {
    background: var(--bg-dark-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
}

body.light-mode .output-files-section {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

.output-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: column;
}

/* Download Info Text */
.download-info-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

body.light-mode .download-info-text {
    color: var(--text-light-secondary);
    margin-bottom: 0px;
}

/* Download Group */
.download-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Secondary Info Text for Export section */
.download-info-secondary {
    color: rgba(255, 255, 255, 0.5);
}

body.light-mode .download-info-secondary {
    color: var(--text-light-secondary);
    margin-bottom: 0px;
}

/* PRIMARY: Download Platform Styles - Generated output */
.download-build-button,
.download-primary {
    width: 100%;
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: none;
    margin-bottom: 20px;
}

body.dark-mode .download-build-button,
body.dark-mode .download-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.light-mode .download-build-button,
body.light-mode .download-primary {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.download-build-button:hover:not(:disabled),
.download-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.download-build-button:active:not(:disabled),
.download-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* SECONDARY: Export JSON Tokens - Raw data export */
.download-button,
.download-secondary {
    width: 100%;
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: none;
}

body.dark-mode .download-button,
body.dark-mode .download-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.light-mode .download-button,
body.light-mode .download-secondary {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.download-button:hover:not(:disabled),
.download-secondary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.download-button:disabled,
.download-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.download-button:active:not(:disabled),
.download-secondary:active:not(:disabled) {
    transform: translateY(0);
}

.download-build-button:disabled,
.download-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sample-button {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.sample-button:hover {
    background: var(--primary-color);
    color: white;
}

.sample-button-zip {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f093fb;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sample-button-zip:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr 1fr;
    }
    
    .textarea-container {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .column {
        max-height: none;
        padding-right: 0;
    }
    
    .textarea-container {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
    }
    
    .code-editor {
        min-height: 200px;
    }
    
    .output-controls {
        flex-direction: column;
    }
    
    .download-build-button,
    .download-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    section {
        padding: 15px;
        border-radius: 8px;
    }
    
    h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .textarea-container {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
    }
    
    .code-editor {
        min-height: 180px;
    }
    
    .CodeMirror {
        font-size: 11px !important;
    }
    
    .download-build-button,
    .download-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .build-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .add-theme-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Delete Theme Confirmation Modal */
.delete-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.delete-modal-overlay.show {
    display: flex;
}

.delete-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.delete-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.delete-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.delete-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.delete-modal-close:hover {
    color: #333;
}

.delete-modal-body {
    padding: 24px;
}

.delete-modal-body p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.delete-modal-body strong {
    color: #333;
    font-weight: 600;
}

.delete-modal-warning {
    color: #d9534f;
    font-weight: 500;
    margin-top: 16px !important;
    padding: 12px;
    background-color: #fdeef0;
    border-left: 3px solid #d9534f;
    border-radius: 4px;
}

.delete-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    justify-content: flex-end;
}

.delete-modal-cancel {
    padding: 10px 24px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-modal-cancel:hover {
    background-color: #e8e8e8;
    border-color: #bbb;
}

.delete-modal-confirm {
    padding: 10px 24px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-modal-confirm:hover {
    background-color: #c9302c;
    box-shadow: 0 4px 12px rgba(217, 83, 79, 0.3);
}

.delete-modal-confirm:active {
    transform: translateY(1px);
}

.sample-data-header {
    display: none;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 99;
}

body.light-mode .app-footer {
    color: var(--text-light-secondary);
}

.footer-left {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-right: 12px;
}

.footer-center {
    flex: 0 0 auto;
    text-align: center;
    white-space: nowrap;
}

.app-footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: all 0.3s ease;
}

.app-footer a:hover {
    opacity: 0.8;
}

body.dark-mode .app-footer a {
    color: rgba(255, 255, 255, 0.95);
}

body.light-mode .app-footer a {
    color: #5b5fc7;
    border-bottom-color: #5b5fc7;
}

.app-footer .heart {
    display: inline-block;
    animation: heartBeat 1.3s ease-in-out infinite;
}

.json-bracket.start {
    margin-left: -20px;
}

.json-bracket.end {
    margin-left: 20px;
}

/* Feedback Bubble */
.feedback-bubble {
    display: none;
}

/* ==========================================
   DARK MODE ADDITIONAL STYLES
   ========================================== */

body.dark-mode .close-modal-btn {
    color: var(--text-dark-secondary);
}

body.dark-mode .close-modal-btn:hover {
    color: var(--text-dark);
}

body.dark-mode .validation-message {
    color: #ff6b6b;
}

body.dark-mode .field-error {
    color: #ff6b6b;
}

body.dark-mode #theme-name-input.error {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

body.dark-mode .token-sets-list {
    border-color: var(--border-dark);
    background: var(--bg-dark-tertiary);
}

body.dark-mode .token-set-checkbox:hover {
    background: var(--bg-dark-secondary);
}

body.dark-mode .token-set-checkbox label {
    color: var(--text-dark);
}

body.dark-mode #theme-name-input {
    background: var(--bg-dark-tertiary);
    border-color: var(--border-dark);
    color: var(--text-dark);
}

body.dark-mode #theme-name-input:focus {
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(91, 95, 199, 0.1);
}

body.dark-mode .cancel-button {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.dark-mode .cancel-button:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-dark);
}

body.dark-mode .theme-modal-footer {
    border-top: 1px solid var(--border-dark);
    background: var(--bg-dark-tertiary);
}

body.dark-mode .delete-modal {
    background: var(--bg-dark-secondary);
    color: var(--text-dark);
}

body.dark-mode .delete-modal-header {
    border-bottom: 1px solid var(--border-dark);
}

body.dark-mode .delete-modal-header h3 {
    color: var(--text-dark);
}

body.dark-mode .delete-modal-close {
    color: var(--text-dark-secondary);
}

body.dark-mode .delete-modal-close:hover {
    color: var(--text-dark);
}

body.dark-mode .delete-modal-body {
    color: var(--text-dark-secondary);
}

body.dark-mode .delete-modal-body strong {
    color: var(--text-dark);
}

body.dark-mode .delete-modal-warning {
    background-color: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
    color: #ff8a8a;
}

body.dark-mode .delete-modal-footer {
    border-top: 1px solid var(--border-dark);
}

body.dark-mode .delete-modal-cancel {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.dark-mode .delete-modal-cancel:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--text-dark-secondary);
}

body.dark-mode .platform-toggle-btn {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.dark-mode .platform-toggle-btn:hover {
    border-color: var(--accent-dark);
    background: var(--bg-dark-secondary);
}

body.dark-mode .platform-toggle-btn.active {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-dark);
    color: var(--accent-dark);
}

body.dark-mode .add-theme-button {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.dark-mode .add-theme-button:hover:not(:disabled) {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-dark);
}

body.dark-mode .download-themes-icon-btn {
    background: var(--bg-dark-tertiary);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.dark-mode .download-themes-icon-btn:hover {
    background: var(--bg-dark-secondary);
}

body.dark-mode .themes-header {
    color: var(--text-dark-secondary);
}

body.dark-mode .theme-badge-count {
    background: var(--bg-dark-secondary);
    color: var(--text-dark-secondary);
}

body.dark-mode .app-footer {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode input:disabled,
body.dark-mode select:disabled {
    opacity: 0.6;
}

/* Responsive Design for Header */
@media (max-width: 1024px) {
    .header-content {
        gap: 30px;
    }
    
    .header-left {
        min-width: 160px;
    }
    
    .header-title {
        font-size: 28px;
    }
    
    .header-description {
        font-size: 14px;
    }
    
    .header-subheading {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    
    .header-left .header-text {
        text-align: center;
    }
    
    .header-right {
        align-items: center;
        text-align: center;
    }
    
    .header-title {
        font-size: 24px;
        text-align: center;
    }
    
    .header-subtitle {
        text-align: center;
    }
    
    .header-instruction {
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
    }
}






