/* Art or Not? - Elevated Playful Design System */

:root {
    /* Colors */
    --bg-primary: #fafafa;
    --bg-white: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-light: #e5e5e5;
    --accent-art: #d4af37;
    --accent-trash: #8b8b8b;
    --accent-success: #2d5a27;
    --accent-error: #8b2635;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 40px;
}

/* Image Display */
.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    max-height: 60vh;
    margin-bottom: var(--space-xl);
    position: relative;
}

#current-image {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: var(--bg-white);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: opacity 0.2s ease;
}

#current-image.loading {
    opacity: 0;
}

/* Loading spinner */
.image-container::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-art);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-container.loading::before {
    opacity: 1;
}

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

#current-image:active {
    cursor: grabbing;
}

/* Swipe hint overlay */
.swipe-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 1.5rem;
    padding: var(--space-md) var(--space-lg);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0.9;
    z-index: 10;
}

.swipe-hint.hidden {
    display: none;
}

.swipe-hint.art {
    background: var(--accent-art);
    color: white;
}

.swipe-hint.trash {
    background: var(--accent-trash);
    color: white;
}

.swipe-hint.confident-art {
    background: var(--accent-art);
    color: white;
    border: 3px solid white;
}

.swipe-hint.confident-trash {
    background: var(--accent-trash);
    color: white;
    border: 3px solid white;
}

/* Vote Buttons - Understated outline style */
.button-container {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.vote-btn {
    padding: var(--space-md) var(--space-xl);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
}

.vote-btn:hover:not(:disabled) {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.vote-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vote-btn.art-btn:hover:not(:disabled) {
    border-color: var(--accent-art);
    color: var(--accent-art);
}

.vote-btn.trash-btn:hover:not(:disabled) {
    border-color: var(--accent-trash);
    color: var(--text-primary);
}

.vote-btn .icon {
    font-size: 1.2rem;
}

/* Vote instruction text */
.vote-instruction {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.result {
    text-align: center;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 10px;
    font-size: 1.2rem;
}

.result.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.hidden {
    display: none;
}

.next-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.next-btn:hover {
    background-color: #27ae60;
}

.stats {
    margin-top: 60px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

#stats-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-width: 200px;
}

.stat-item h4 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-weight: normal;
}

.stat-item .percentage {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

.stat-item.overall {
    background-color: #ecf0f1;
    border: 2px solid #3498db;
}

.stat-item.overall .percentage {
    color: #2c3e50;
    font-size: 2.5rem;
}

.keyboard-shortcuts {
    margin-top: 40px;
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.keyboard-shortcuts h4 {
    margin-bottom: 15px;
    color: #7f8c8d;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    max-width: 300px;
    margin: 0 auto;
    text-align: left;
}

.key {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 0.9rem;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

.navigation-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #95a5a6;
    color: white;
}

.nav-btn:hover:not(:disabled) {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .image-container {
        height: 400px;
    }
    
    #current-image {
        max-width: 90vw;
        max-height: 400px;
    }
    
    .button-container {
        flex-direction: row;
        width: 95%;
        margin: 0 auto 30px;
        gap: 10px;
    }
    
    .vote-btn {
        flex: 1;
        padding: 15px 10px;
        font-size: 1.1rem;
        min-width: 0;
        justify-content: center;
    }
    
    .vote-btn .text {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .image-container {
        height: 350px;
    }
    
    #current-image {
        max-height: 350px;
    }
    
    .button-container {
        gap: 8px;
        width: 98%;
    }
    
    .vote-btn {
        padding: 12px 8px;
        font-size: 1rem;
    }
    
    .vote-btn .icon {
        font-size: 1.2rem;
    }
    
    .vote-btn .text {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

.footer-links {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.instructions {
    max-width: 600px;
    margin: 0 auto 30px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.instructions summary {
    font-weight: bold;
    cursor: pointer;
    color: #2c3e50;
    font-size: 1.1rem;
    padding: 10px;
    list-style: none;
    position: relative;
}

.instructions summary::-webkit-details-marker {
    display: none;
}

.instructions summary::before {
    content: '▶';
    position: absolute;
    left: -5px;
    transition: transform 0.3s ease;
}

.instructions[open] summary::before {
    transform: rotate(90deg);
}

.instructions-content {
    padding: 15px;
    line-height: 1.8;
}

.instructions-content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.instructions-content li {
    margin-bottom: 10px;
}

.challenge-text {
    font-style: italic;
    color: #7f8c8d;
    margin-top: 15px;
    text-align: center;
}

.submit-container {
    text-align: center;
    margin: 20px 0;
}

.submit-button {
    display: inline-block;
    background-color: #9b59b6;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.submit-button:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.help-section {
    max-width: 600px;
    margin: 0 auto;
    background: #ecf0f1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bdc3c7;
}

.help-section summary {
    cursor: pointer;
    color: #34495e;
    font-size: 1rem;
    font-weight: 500;
    list-style: none;
}

.help-section summary::-webkit-details-marker {
    display: none;
}

.help-content {
    padding: 20px;
    line-height: 1.6;
}

.help-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.help-content h4:first-child {
    margin-top: 10px;
}

.app-description {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-description h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.app-description p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
}

.vote-results {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.vote-results p {
    display: inline-block;
    margin: 0 15px;
    font-size: 1.3rem;
    font-weight: 500;
}

.vote-results em {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.reveal-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.3s ease;
}

.reveal-btn:hover {
    background-color: #2980b9;
}

.actual-details {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.actual-details p {
    margin: 8px 0;
    text-align: left;
}

.previous-image-info {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.previous-image-info p {
    margin: 8px 0;
    color: #7f8c8d;
    font-style: italic;
}

/* Streak Display */
.streak-display {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.streak-display.hidden {
    display: none;
}

.streak-count {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent-art);
}

.streak-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: var(--space-xs);
}

.streak-display.hot .streak-count {
    color: #e63946;
}

.streak-display.hot::after {
    content: ' \01F525'; /* Fire emoji */
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-md);
    transition: color 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Desktop: top nav instead */
@media (min-width: 768px) {
    .bottom-nav {
        position: static;
        border-top: none;
        border-bottom: 1px solid var(--border-light);
        margin-bottom: var(--space-xl);
    }
}

/* Mobile: add bottom padding for fixed nav */
@media (max-width: 767px) {
    body {
        padding-bottom: 80px;
    }
}

/* Verdict Display */
.verdict-container {
    text-align: center;
    padding: var(--space-xl);
    margin: var(--space-lg) auto;
    max-width: 500px;
    animation: fadeIn 0.5s ease;
}

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

.verdict-percentages {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.verdict-stat {
    text-align: center;
}

.verdict-stat .percentage {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
}

.verdict-stat .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.verdict-stat.art .percentage {
    color: var(--accent-art);
}

.verdict-stat.trash .percentage {
    color: var(--accent-trash);
}

.verdict-copy {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
}

/* Tier-specific styling */
.verdict-container.tier-unanimous .verdict-copy {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.verdict-container.tier-landslide .verdict-copy {
    font-size: 1.375rem;
}

.verdict-container.tier-deadlocked .verdict-copy {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Auth Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

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

.auth-form h2 {
    margin-bottom: 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #666;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.auth-form input:focus {
    outline: none;
    border-color: #333;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #333;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
}

.btn-primary:hover {
    background: #555;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #333;
    font-weight: 500;
}

.auth-error {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}

.auth-error.hidden {
    display: none;
}

