:root {
    --color-primary: #e98631;
    /* Couch Soup Orange */
    --color-bg: #121212;
    --color-surface: #1e1e1e;
    --color-text: #ffffff;
    --color-text-muted: #a0a0a0;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --font-heading: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

[data-theme='light'] {
    --color-bg: #f4f4f5;
    --color-surface: #ffffff;
    --color-text: #18181b;
    --color-text-muted: #71717a;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--color-bg);
    color: var(--color-text);
}

aside {
    width: 400px;
    padding: 2rem;
    border-right: 1px solid rgba(128, 128, 128, 0.2);
    overflow-y: auto;
    background: var(--color-surface);
    z-index: 10;
    min-width: 0;
    flex-shrink: 0;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    position: relative;
    z-index: 5;
    min-width: 0;
    overflow: hidden;
}

.preview-background-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Form Styles */
.control-group {
    margin-bottom: 2rem;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.grid-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.btn-option {
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(128, 128, 128, 0.1);
    color: var(--color-text);
    border: 1px solid transparent;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
    text-align: center;
}

.btn-option.active {
    background: var(--color-primary);
    color: white;
}

textarea,
select {
    width: 100%;
    padding: 1rem;
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: inherit;
}

textarea {
    resize: vertical;
    font-size: 1.2rem;
    font-weight: bold;
}

.upload-box {
    border: 2px dashed var(--color-text-muted);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.download-btn {
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
}

/* Mobile Tabs */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        position: relative;
    }

    aside,
    main {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        inset: 0 !important;
        padding-bottom: 70px !important;
    }

    .mobile-tab-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: var(--color-surface);
        border-top: 1px solid rgba(128, 128, 128, 0.2);
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        z-index: 100;
    }

    .tab-btn {
        height: 100%;
        background: transparent;
        border: none;
        border-right: 1px solid rgba(128, 128, 128, 0.1);
        color: var(--color-text-muted);
        font-size: 0.9rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .tab-btn.active {
        background: rgba(255, 255, 255, 0.05);
        color: var(--color-primary);
        font-weight: bold;
        box-shadow: inset 0 -3px 0 var(--color-primary);
    }

    .mobile-view-hidden {
        z-index: 10 !important;
        opacity: 1 !important;
        pointer-events: none;
    }

    .active-view {
        z-index: 50 !important;
        pointer-events: auto;
    }
}