/* assets/css/style.css */

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(to right, #7fad7d, #99c19b);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-icon {
    font-size: 1.4rem;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.header-icon:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

.hamburger {
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: #f8f9fa;
    transform: rotate(90deg);
}

.settings-dropdown {
    position: absolute;
    right: 2rem;
    top: 4rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    display: none;
    min-width: 200px;
}

.settings-dropdown.active {
    display: block;
}

.theme-switch {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.theme-switch:hover {
    background: #f8f9fa;
}
.logo-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    text-decoration: none;
}

/* Maintain existing logo hover effect */
.logo-link:hover .logo {
    transform: scale(1.05);
}

/* Dark Theme Styles - Only body background and game container background */
body.dark-theme {
    background: #1a1a1a;
}

body.dark-theme .game-container {
    background: #2d2d2d;
}
body.dark-theme .game-container > h1.text-center {
    color: #ffffff !important;
}

body.dark-theme .attempt-counter {
    color: #ffffff !important;
}

body.dark-theme #no-guesses-message {
    color: #ffffff !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    .logo {
        height: 35px;
    }
    .header-icon {
        font-size: 1.2rem;
    }
    .hamburger {
        font-size: 1.4rem;
    }
}
body {
    background: #f0f2f5;
    font-family: 'Arial', sans-serif;
}
.game-container {
    max-width: 600px;
    margin: 6rem auto 2rem; /* Increased top margin */
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}
.puzzle-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 120px);
    gap: 2px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 2rem;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}
.puzzle-piece {
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.puzzle-piece.revealed {
    background: transparent;
    animation: revealPiece 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes revealPiece {
    0% { transform: scale(0.98); opacity: 0.5; }
    50% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); }
}
.puzzle-piece.revealed::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 560px;
    height: 360px;
    background-image: url('image-proxy.php?token=<?= $image_token ?>');
    background-size: 560px 360px;
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    to { opacity: 1; }
}
.attempt-counter {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 1.5rem;
    text-align: center;
}
.select2-container--bootstrap-5 {
    margin-bottom: 1rem;
}
.select2-dropdown {
    border-radius: 8px!important;
    border: 1px solid #dee2e6!important;
}
.guess-item {
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.stat-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-item div:first-child {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3436;
    line-height: 1.2;
}
@media (max-width: 600px) {
    .game-container {
        padding: 1rem;
        margin: 1rem auto;
    }
    .puzzle-container {
        grid-template-rows: repeat(3, 80px);
        max-width: 95%;
    }
    .puzzle-piece.revealed::before {
        width: 100%;
        height: 240px;
        background-size: cover;
    }
    .stat-item {
        padding: 0.75rem;
    }
    .stat-value {
        font-size: 1.25rem;
    }
}
/* Tutorial Popup */
.tutorial-popup {
    display: none;
    position: absolute;
    right: 1rem;
    top: 4.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 320px;
    z-index: 2000;
    animation: slideDown 0.3s ease;
}

.tutorial-content {
    padding: 1.5rem;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tutorial-header h5 {
    margin: 0;
    font-size: 1.25rem;
    color: #2d3436;
}

.close-tutorial {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 0.5rem;
}

.tutorial-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #7fad7d;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.step-text {
    flex: 1;
}

.step-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #2d3436;
}

.step-text p {
    margin: 0;
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.4;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .tutorial-popup {
        right: 50%;
        transform: translateX(50%);
        top: 5rem;
        width: 90%;
        max-width: 400px;
    }
    
    .tutorial-content {
        padding: 1rem;
    }
}
/* Footer Styles */
.site-footer {
    background: #2d3436;
    color: #ffffff;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-title {
    color: #7fad7d;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.footer-links li,
.contact-info li {
    margin-bottom: 0.8rem;
}

.footer-links a,
.legal-links a {
    color: #dfe6e9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.legal-links a:hover {
    color: #7fad7d;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #7fad7d;
}

.contact-info i {
    margin-right: 0.8rem;
    color: #7fad7d;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
}

.newsletter-form button {
    background: #7fad7d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #6e9c6b;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0 0;
    margin-top: 3rem;
    border-top: 1px solid #3e4749;
}

.copyright {
    margin-bottom: 1rem;
    color: #b2bec3;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #7fad7d;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

.back-to-top:hover {
    background: #6e9c6b;
}

/* Mobile */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}
.spinner {
    vertical-align: middle;
    margin-left: 8px;
}

.guess-item {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* Ensure header maintains its styling on all pages */
.header {
    background: linear-gradient(to right, #7fad7d, #99c19b) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.header-icon,
.hamburger {
    color: #2d3436 !important;
}

/* Dark mode - keep header the same */
body.dark-theme .header {
    background: linear-gradient(to right, #7fad7d, #99c19b) !important;
}

body.dark-theme .header-icon,
body.dark-theme .hamburger {
    color: #2d3436 !important;
}