/* Simple, clean design inspired by minimal game interfaces */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    color: #2c3e50;
    background-color: #f8f9fa;
    padding: 1rem;
}


.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.header {
    text-align: center;
    padding: 1.5rem 1rem 1.25rem;
    background: #2e51a2;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .header {
        padding: 1.25rem 0.75rem 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .header p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0.5rem 0.75rem;
    }
    
    .header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.4rem;
    }
    
    .header p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.logo {
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.logo:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* UTC Timer */
.utc-timer {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.utc-timer div {
    margin: 0.25rem 0;
}

.current-utc {
    color: #495057;
}

.next-reset {
    color: #28a745;
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.nav-button {
    padding: 0.6rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-button {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-button {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
        max-width: 100%;
    }
}

/* Tablet and small desktop adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-button {
        padding: 0.65rem 1.1rem;
        font-size: 0.85rem;
    }
}

.nav-button:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-button.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-button.disabled {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
    backdrop-filter: blur(5px);
}

/* Game area */
.game-area {
    padding: 2rem 1rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Score display for free play */
.score-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.score-section {
    text-align: center;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.score-value.highlight {
    color: #28a745;
    animation: scoreHighlight 0.5s ease-in-out;
}

@keyframes scoreHighlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.battle {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.anime-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.anime-option:hover {
    border-color: #007bff;
}

.anime-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.anime-info {
    flex: 1;
    min-width: 0;
}

.anime-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.anime-score {
    font-weight: 600;
    color: #007bff;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.anime-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    line-height: 1.2;
}

.anime-english-name {
    font-style: italic;
    margin-bottom: 0.25rem;
}

.anime-genres, .anime-studios {
    margin-bottom: 0.15rem;
}

.anime-studios {
    font-weight: 500;
}

/* Scores should remain hidden until game selection is made */

/* Results screen styles */
.results-container {
    text-align: center;
    padding: 2rem;
}

.results-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #495057;
    word-break: break-all;
    line-height: 1.4;
}

.results-emojis {
    font-size: 2rem;
    margin: 1rem 0;
    letter-spacing: 0.2rem;
    line-height: 1.2;
}

.results-score {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0;
}

.results-date {
    color: #6c757d;
    margin: 1rem 0;
}

.results-url {
    color: #007bff;
    margin: 1rem 0;
}

.copy-button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #28a745;
    color: white;
    border: 2px solid #28a745;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-button:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.vs-indicator {
    text-align: center;
    font-weight: 700;
    color: #6c757d;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Score tracker for daily challenge */
.score-tracker {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
}

.score-box {
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.score-box.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.score-box.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Game states */
.anime-option.correct {
    border-color: #28a745;
    background-color: #f8fff9;
}

.anime-option.incorrect {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.anime-option.correct .anime-score,
.anime-option.incorrect .anime-score {
    opacity: 1;
}


/* Homepage styles */
.content {
    padding: 2rem 1rem;
}

.centered-content {
    max-width: 500px;
    margin: 0 auto;
}

/* Tab container */
.tab-container {
    margin-bottom: 2rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-content {
    min-height: 200px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

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

.tab-pane p {
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.tab-pane a {
    color: #007bff;
    text-decoration: none;
}

.tab-pane a:hover {
    text-decoration: underline;
}

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

/* Medium screens - tablet/small laptop */
@media (max-width: 767px) and (min-width: 481px) {
    .score-tracker {
        gap: 0.4rem;
        padding: 0.75rem;
    }
    
    .score-box {
        font-size: 1.3rem;
        width: 1.8rem;
        height: 1.8rem;
    }
    
    .score-display {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
        padding: 0.75rem;
    }
    
    .score-label {
        font-size: 0.7rem;
    }
    
    .score-value {
        font-size: 1.3rem;
    }
    
    .results-emojis {
        font-size: 1.6rem;
        letter-spacing: 0.15rem;
    }
    
    .results-container {
        padding: 1.5rem;
    }
}

/* Small screens - mobile */
@media (max-width: 480px) {
    .score-tracker {
        gap: 0.25rem;
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .score-box {
        font-size: 1rem;
        width: 1.4rem;
        height: 1.4rem;
        border-radius: 3px;
    }
    
    .score-display {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
        padding: 0.5rem;
    }
    
    .score-label {
        font-size: 0.65rem;
    }
    
    .score-value {
        font-size: 1.2rem;
    }
    
    .results-emojis {
        font-size: 1.3rem;
        letter-spacing: 0.1rem;
        margin: 0.75rem 0;
    }
    
    .results-container {
        padding: 1rem;
    }
    
    .results-score {
        font-size: 1.1rem;
    }
    
    .copy-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Very small screens - small mobile */
@media (max-width: 360px) {
    .score-tracker {
        gap: 0.2rem;
        padding: 0.25rem;
    }
    
    .score-box {
        font-size: 0.9rem;
        width: 1.2rem;
        height: 1.2rem;
        border-radius: 2px;
    }
    
    .score-display {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.2rem;
        padding: 0.4rem;
    }
    
    .score-label {
        font-size: 0.6rem;
    }
    
    .score-value {
        font-size: 1.1rem;
    }
    
    .results-emojis {
        font-size: 1.1rem;
        letter-spacing: 0.05rem;
        margin: 0.5rem 0;
    }
    
    .results-container {
        padding: 0.75rem;
    }
    
    .results-score {
        font-size: 1rem;
    }
    
    .copy-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Responsive design */
@media (min-width: 768px) {
    body {
        padding: 2rem;
    }
    
    .header {
        padding: 2.5rem 2rem 2rem;
    }
    
    .header h1 {
        font-size: 3rem;
    }
    
    .content {
        padding: 3rem 2rem;
    }
    
    .game-area {
        padding: 2rem;
    }
    
    .battle {
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 2rem;
    }
    
    .anime-option {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .anime-cover {
        width: 100px;
        height: 140px;
        margin-bottom: 1rem;
    }
    
    .anime-title {
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
    
    .vs-indicator {
        font-size: 1.2rem;
        padding: 0;
    }
}