/* Daily Tarot - CSS 3.0 with 2026 UI/UX Trends */

:root {
    --primary-color: #9b59b6;
    --primary-light: #b88cc5;
    --primary-dark: #6c3483;
    --accent-gold: #e8c547;
    --accent-light: #f5d547;
    --bg-dark: #0f0f23;
    --bg-darker: #0a0a17;
    --surface: #1a1a2e;
    --surface-light: #252540;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --success: #4caf50;
    --error: #f44336;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --transition-fast: 200ms ease;
    --transition-medium: 300ms ease;
    --transition-slow: 500ms ease;

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
}

/* Light mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: #f5f5f5;
        --bg-darker: #efefef;
        --surface: #ffffff;
        --surface-light: #f9f9f9;
        --text-primary: #1a1a1a;
        --text-secondary: #666666;
        --glass-bg: rgba(155, 89, 182, 0.05);
        --glass-border: rgba(155, 89, 182, 0.2);
    }
}

/* Light mode override via data-theme */
[data-theme="light"] {
    --bg-dark: #f5f5fa;
    --bg-darker: #efeff5;
    --surface: #ffffff;
    --surface-light: #f9f9fa;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a70;
    --glass-bg: rgba(155, 89, 182, 0.05);
    --glass-border: rgba(155, 89, 182, 0.2);
}

[data-theme="light"] body {
    background-color: var(--bg-dark);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(155, 89, 182, 0.1);
}

/* Light mode: title gradient - darker tones for readability */
[data-theme="light"] .app-header h1 {
    background: linear-gradient(135deg, #b8860b, #6c3483);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light mode: tagline */
[data-theme="light"] .app-header .tagline {
    color: #555;
}

/* Light mode: tab buttons */
[data-theme="light"] .tab-btn {
    color: #555;
}

[data-theme="light"] .tab-btn:hover {
    color: #b8860b;
}

[data-theme="light"] .tab-btn.active {
    color: #fff;
}

/* Light mode: intro card text */
[data-theme="light"] .intro-card h2 {
    color: #8b6914;
}

[data-theme="light"] .intro-card .hint {
    color: #555;
}

/* Light mode: card instruction */
[data-theme="light"] .card-instruction h3 {
    color: #8b6914;
}

[data-theme="light"] .card-instruction p {
    color: #555;
}

/* Light mode: card label */
[data-theme="light"] .card-label {
    color: #555;
}

/* Light mode: result card heading */
[data-theme="light"] .result-card h2 {
    color: #8b6914;
}

/* Light mode: interpretation text */
[data-theme="light"] .interpretation-position {
    color: #666;
}

[data-theme="light"] .card-interpretation h4 {
    color: #8b6914;
}

[data-theme="light"] .meaning-text {
    color: #555;
}

[data-theme="light"] .card-direction {
    background: rgba(155, 89, 182, 0.12);
    color: #6c3483;
}

/* Light mode: summary section */
[data-theme="light"] .summary-section {
    background: rgba(155, 89, 182, 0.08);
}

[data-theme="light"] .summary-section h3 {
    color: #8b6914;
}

[data-theme="light"] .summary-text {
    color: #333;
}

/* Light mode: premium section */
[data-theme="light"] .premium-badge {
    color: #333;
}

[data-theme="light"] .premium-section h3,
[data-theme="light"] .premium-result h3 {
    color: #8b6914;
}

/* Light mode: AI analysis */
[data-theme="light"] .analysis-title {
    color: #8b6914;
}

[data-theme="light"] .analysis-text {
    color: #555;
}

[data-theme="light"] .analysis-block {
    background: #f0f0f5;
}

/* Light mode: advice list */
[data-theme="light"] .advice-list li {
    background: rgba(155, 89, 182, 0.06);
    color: #333;
}

/* Light mode: category section */
[data-theme="light"] .category-name {
    color: #333;
}

[data-theme="light"] .category-card:hover {
    background: rgba(155, 89, 182, 0.08);
}

/* Light mode: gallery */
[data-theme="light"] .gallery-intro h2 {
    color: #8b6914;
}

[data-theme="light"] .gallery-intro .hint {
    color: #555;
}

[data-theme="light"] #detail-card-name {
    color: #8b6914;
}

[data-theme="light"] .detail-meaning h4 {
    color: #8b6914;
}

[data-theme="light"] .detail-meaning p {
    color: #555;
}

/* Light mode: limit info badges */
[data-theme="light"] .limit-text,
[data-theme="light"] .limit-counter {
    color: #6c3483;
    background: rgba(155, 89, 182, 0.1);
    border-color: #9b59b6;
}

/* Light mode: rec section */
[data-theme="light"] .rec-title {
    color: #8b6914;
}

[data-theme="light"] .rec-card {
    color: #333;
}

[data-theme="light"] .rec-card:hover {
    background: rgba(155, 89, 182, 0.08);
}

/* Light mode: primary button text always white on purple bg */
[data-theme="light"] .primary-btn {
    color: #fff;
}

/* Light mode: secondary button */
[data-theme="light"] .secondary-btn {
    color: #6c3483;
    background: #f0f0f5;
    border-color: rgba(155, 89, 182, 0.3);
}

[data-theme="light"] .secondary-btn:hover {
    background: rgba(155, 89, 182, 0.15);
}

/* Light mode: premium button text dark on gold bg */
[data-theme="light"] .premium-btn {
    color: #333;
}

/* Light mode: footer link */
[data-theme="light"] .back-link {
    color: #6c3483;
}

/* Light mode: ad banner */
[data-theme="light"] .ad-banner {
    border-color: #ccc;
    color: #999;
}

/* Light mode: interstitial */
[data-theme="light"] .interstitial-content p {
    color: #555;
}

[data-theme="light"] #countdown {
    color: #8b6914;
}

/* Light mode: stars and cosmic bg hidden */
[data-theme="light"] .stars,
[data-theme="light"] .cosmic-bg {
    opacity: 0;
}

/* Light mode: lang menu shadow */
[data-theme="light"] .lang-menu {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Light mode: category result text */
[data-theme="light"] .result-text {
    color: #333;
}

/* Light mode: category header title */
[data-theme="light"] #category-title {
    color: #8b6914;
}

/* ============================================================ */
/* RESET & BASE STYLES */
/* ============================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(155, 89, 182, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

/* ============================================================ */
/* BACKGROUND & COSMIC EFFECTS */
/* ============================================================ */

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 1px;
    background: white;
    box-shadow:
        100px 150px 0 white,
        200px 250px 0 white,
        300px 100px 0 white,
        400px 300px 0 white,
        500px 180px 0 white,
        600px 220px 0 white,
        700px 150px 0 white,
        800px 280px 0 white,
        900px 120px 0 white,
        1000px 200px 0 white;
    animation: twinkle 5s infinite;
}

.stars::after {
    top: 50%;
    left: 50%;
    animation: twinkle 7s infinite 2s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 400px 300px at 20% 40%, rgba(155, 89, 182, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 350px 250px at 80% 70%, rgba(232, 197, 71, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -2;
}

/* ============================================================ */
/* APP LOADER */
/* ============================================================ */

.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: float 2s ease-in-out infinite;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 1rem auto;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================================ */
/* CONTAINER & LAYOUT */
/* ============================================================ */

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
}

/* ============================================================ */
/* THEME & LANGUAGE TOGGLES */
/* ============================================================ */

.theme-toggle,
.lang-btn {
    position: fixed;
    top: 1rem;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle {
    right: 4.5rem;
}

.lang-btn {
    right: 1rem;
}

.theme-toggle:hover,
.lang-btn:hover {
    background: rgba(155, 89, 182, 0.3);
    border-color: var(--accent-gold);
    transform: scale(1.1);
}

.language-selector {
    position: relative;
}

.lang-menu {
    position: fixed;
    top: 4rem;
    right: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 999;
    min-width: 180px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.lang-menu.hidden {
    display: none;
}

.lang-option {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.lang-option:hover {
    background: rgba(155, 89, 182, 0.2);
    padding-left: 1.5rem;
}

.lang-option.active {
    background: rgba(155, 89, 182, 0.3);
    color: var(--accent-gold);
}

/* ============================================================ */
/* HEADER */
/* ============================================================ */

.app-header {
    text-align: center;
    margin: 3rem 0 2rem 0;
    padding: 2rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    animation: slideDown 0.5s ease;
}

.app-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.app-header .tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

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

/* ============================================================ */
/* TAB MENU */
/* ============================================================ */

.tab-menu {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    background: var(--surface);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-btn:hover {
    color: var(--accent-gold);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

/* ============================================================ */
/* TAB CONTENT */
/* ============================================================ */

.main-content {
    margin: 2rem 0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* ============================================================ */
/* CARDS & CONTAINERS */
/* ============================================================ */

.reading-intro,
.category-selector,
.gallery-intro,
.intro-card {
    margin-bottom: 2rem;
}

.intro-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.intro-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.intro-card .hint {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.limit-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.limit-text,
.limit-counter {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(155, 89, 182, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    border: 1px solid var(--primary-color);
}

/* ============================================================ */
/* BUTTONS */
/* ============================================================ */

button {
    font-family: inherit;
}

.primary-btn,
.secondary-btn,
.premium-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
    width: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

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

.secondary-btn {
    background: var(--surface-light);
    color: var(--accent-gold);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(155, 89, 182, 0.2);
    border-color: var(--accent-gold);
}

.premium-btn {
    background: linear-gradient(135deg, var(--accent-gold), #d4a924);
    color: var(--bg-dark);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(232, 197, 71, 0.3);
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 197, 71, 0.4);
}

.btn-icon,
.premium-icon {
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-direction: column;
}

/* ============================================================ */
/* TAROT CARD DISPLAY */
/* ============================================================ */

.card-area {
    margin: 2rem 0;
}

.card-area.hidden {
    display: none;
}

.card-instruction {
    text-align: center;
    margin-bottom: 2rem;
}

.card-instruction h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.card-instruction p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.tarot-spread {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.card-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.card-back {
    width: 100px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 8px 20px rgba(155, 89, 182, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    transform-style: preserve-3d;
    position: relative;
}

.card-back:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 30px rgba(155, 89, 182, 0.5);
}

.card-back:active {
    transform: scale(1.02) translateY(-2px);
}

.card-back-pattern {
    width: 90%;
    height: 140px;
}

.card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-height: 20px;
}

/* 3D Flip animation */
.card-back.flipped {
    animation: flip 0.6s ease-in-out;
}

@keyframes flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(180deg); }
}

.card-display {
    width: 100px;
    height: 150px;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* ============================================================ */
/* RESULT CARDS */
/* ============================================================ */

.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    animation: slideUp 0.4s ease;
}

.result-card.hidden {
    display: none;
}

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

.result-card h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    text-align: center;
}

.cards-interpretation {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .cards-interpretation {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-interpretation {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    text-align: center;
}

.interpretation-position {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.card-display {
    margin: 0.5rem auto;
}

.card-interpretation h4 {
    font-size: 1rem;
    margin: 0.75rem 0;
    color: var(--accent-gold);
}

.meaning-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.card-direction {
    font-size: 0.8rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(155, 89, 182, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    font-weight: 500;
}

/* ============================================================ */
/* SUMMARY & PREMIUM SECTIONS */
/* ============================================================ */

.summary-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(155, 89, 182, 0.15);
    border-left: 4px solid var(--accent-gold);
    border-radius: var(--radius-md);
}

.summary-section h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-text {
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.premium-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    border: 1px solid var(--glass-border);
}

.premium-section.hidden {
    display: none;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold), #d4a924);
    color: var(--bg-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.premium-result {
    background: linear-gradient(135deg, rgba(232, 197, 71, 0.1), rgba(155, 89, 182, 0.1));
    border: 2px solid var(--accent-gold);
}

.premium-section h3,
.premium-result h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* ============================================================ */
/* AI ANALYSIS */
/* ============================================================ */

.ai-analysis {
    margin: 1.5rem 0;
}

.analysis-block {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-gold);
}

.analysis-title {
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-text {
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.advice-list {
    list-style: none;
    padding: 0;
}

.advice-list li {
    padding: 0.75rem;
    background: rgba(155, 89, 182, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    padding-left: 2rem;
    position: relative;
}

.advice-list li::before {
    content: '✓';
    position: absolute;
    left: 0.75rem;
    color: var(--success);
    font-weight: bold;
}

/* ============================================================ */
/* CATEGORY SELECTION */
/* ============================================================ */

.category-grid,
.rec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.category-card {
    background: var(--surface);
    border: 2px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
    min-height: 120px;
    justify-content: center;
}

.category-card:hover {
    border-color: var(--accent-gold);
    background: rgba(232, 197, 71, 0.1);
    transform: translateY(-5px);
}

.category-card:active {
    transform: translateY(-2px);
}

.category-icon {
    font-size: 2rem;
}

.category-name {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-primary);
}

/* ============================================================ */
/* GALLERY */
/* ============================================================ */

.gallery-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.gallery-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.gallery-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(232, 197, 71, 0.3);
    transform: scale(1.05);
}

.card-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 1rem;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.card-detail.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    background: var(--surface);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    max-width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

.detail-card {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

#detail-card-name {
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.detail-meaning h4 {
    color: var(--accent-gold);
    margin: 1rem 0 0.5rem 0;
}

.detail-meaning p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ============================================================ */
/* RECOMMENDATIONS */
/* ============================================================ */

.recommendations-section {
    margin: 3rem 0;
    padding: 2rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.rec-title {
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 480px) {
    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.rec-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
    min-height: 100px;
    justify-content: center;
}

.rec-card:hover {
    border-color: var(--accent-gold);
    background: rgba(232, 197, 71, 0.1);
    transform: translateY(-5px);
}

.rec-icon {
    font-size: 2rem;
}

.rec-name {
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

/* ============================================================ */
/* SOCIAL SHARE BUTTONS */
/* ============================================================ */

.share-section {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}
.share-btn {
    min-height: 44px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.share-btn:focus-visible {
    outline: 3px solid var(--primary-color, #9b59b6);
    outline-offset: 2px;
}
.share-twitter {
    background: #000;
    color: #fff;
}
.share-url {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.15);
}
[data-theme="light"] .share-url {
    background: rgba(0,0,0,0.05);
    color: #333;
    border-color: rgba(0,0,0,0.1);
}
.share-btn:hover {
    transform: translateY(-1px);
}

/* ============================================================ */
/* FOOTER */
/* ============================================================ */

.game-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.back-link:hover {
    gap: 0.75rem;
}

/* ============================================================ */
/* AD BANNERS */
/* ============================================================ */

.ad-banner {
    margin: 1rem 0;
    min-height: 100px;
    background: var(--surface);
    border: 1px dashed var(--text-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ad-placeholder,
.ad-placeholder-large {
    color: var(--text-secondary);
    text-align: center;
}

/* ============================================================ */
/* INTERSTITIAL AD */
/* ============================================================ */

.interstitial-ad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.interstitial-ad.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.interstitial-content {
    background: var(--surface);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 90%;
    position: relative;
    text-align: center;
}

.interstitial-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ad-placeholder-large {
    min-height: 250px;
    background: rgba(155, 89, 182, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

#countdown {
    font-weight: bold;
    color: var(--accent-gold);
}

/* ============================================================ */
/* ACCESSIBILITY */
/* ============================================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* ============================================================ */
/* MICROINTERACTIONS */
/* ============================================================ */

.pulse-glow {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(232, 197, 71, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(232, 197, 71, 0.5);
    }
}

/* ============================================================ */
/* RESPONSIVE DESIGN */
/* ============================================================ */

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .theme-toggle {
        right: 3.5rem;
    }

    .app-header {
        margin: 2.5rem 0 1.5rem 0;
        padding: 1.5rem 1rem;
    }

    .app-header h1 {
        font-size: 1.5rem;
    }

    .tab-menu {
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .intro-card {
        padding: 1.5rem 1rem;
    }

    .intro-card h2 {
        font-size: 1.3rem;
    }

    .action-buttons {
        gap: 0.5rem;
    }

    .primary-btn,
    .secondary-btn,
    .premium-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rec-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-content {
        padding: 1.5rem 1rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .app-header h1 {
        font-size: 2.5rem;
    }

    .intro-card {
        padding: 3rem 2rem;
    }

    .tarot-spread {
        gap: 2rem;
    }

    .detail-content {
        max-width: 600px;
    }
}

/* ============================================================ */
/* PRINT STYLES */
/* ============================================================ */

@media print {
    .theme-toggle,
    .lang-btn,
    .ad-banner,
    .interstitial-ad {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }
}

/* Dark mode - force for this mystical app */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* Accessibility: reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
