/**
 * Buchtitel-Generator Styles
 * Mobile-friendly & Dark Mode compatible
 */

/* Genre Tabs */
.genre-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
}

.tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-inverse);
}

/* Slot Machine Container */
.slot-machine {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.3);
}

body.dark-theme .slot-machine {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
}

/* Reels Container */
.reels-container {
    display: none;
}

.reels-container.active {
    display: block;
}

.reels {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

/* Three-reel layout (Fantasy, Literary) */
.reels-three {
    gap: var(--space-md);
}

/* Crime layout with "Mord" label */
.reels-crime {
    gap: var(--space-lg);
}

.mord-label {
    font-size: 2.5em;
    font-weight: var(--font-weight-bold);
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    padding: 0 var(--space-lg);
}

/* Reel styling */
.reel {
    flex: 1;
    max-width: 250px;
    min-width: 150px;
    background: var(--color-bg-elevated);
    border: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    height: 120px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.reel-wide {
    max-width: 500px;
    min-width: 250px;
}

.reel-inactive {
    opacity: 0.4;
    border-color: var(--color-border);
}

body.dark-theme .reel {
    background: var(--color-bg);
    border-color: var(--color-primary-light);
}

/* Reel content */
.reel-content {
    position: absolute;
    width: 100%;
    transition: none;
}

.reel-content.spinning {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    from { transform: translateY(0); }
    to { transform: translateY(-120px); }
}

.reel-item {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    padding: var(--space-md);
    text-align: center;
    line-height: var(--line-height-tight);
}

/* Generate Button */
.btn-generate {
    width: 100%;
    padding: var(--space-xl);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Display */
.result {
    padding: var(--space-2xl);
    background: var(--color-accent);
    border-radius: var(--radius-lg);
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-primary);
}

body.dark-theme .result {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary-light);
}

.result-text {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    line-height: var(--line-height-base);
}

.result-empty {
    color: var(--color-text-muted);
    font-style: italic;
    font-weight: normal;
    font-size: var(--font-size-lg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .genre-tabs {
        flex-direction: column;
    }

    .tab-btn {
        flex: none;
        width: 100%;
    }

    .slot-machine {
        padding: var(--space-lg);
    }

    .reels {
        flex-direction: column;
        gap: var(--space-md);
    }

    .reel {
        max-width: 100%;
        min-width: 100%;
    }

    .reel-wide {
        max-width: 100%;
    }

    .mord-label {
        font-size: 2em;
        padding: 0;
    }

    .reel-item {
        font-size: 1em;
        padding: var(--space-sm);
    }

    .result-text {
        font-size: var(--font-size-xl);
    }

    .btn-generate {
        font-size: var(--font-size-lg);
        padding: var(--space-lg);
    }
}