body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: #1a1a2e;
    overflow: hidden;
}

#gameCanvas {
    background: #16213e;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

/* Auth Overlay Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.auth-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    color: #ffffff;
    opacity: 0.6;
    transition: opacity 0.3s;
    border-bottom: 2px solid transparent;
}

.tab.active {
    opacity: 1;
    border-bottom: 2px solid #3498db;
}

.auth-content {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-button {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    border: none;
    padding: 0.8rem 2rem;
    width: 100%;
    font-size: 1rem;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: 'Poppins', sans-serif;
}

.auth-button:hover {
    transform: scale(1.02);
}

.auth-button.anonymous {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
}

.divider {
    display: flex;
    align-items: center;
    color: #ffffff;
    opacity: 0.5;
    margin: 1rem 0;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 1rem;
}

.auth-message {
    color: #e74c3c;
    font-size: 0.9rem;
    min-height: 20px;
    margin-top: 10px;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.auth-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
}

.auth-message.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-left: 3px solid #2ecc71;
}

/* Leaderboard Styles */
.leaderboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
}

.leaderboard-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
}

.leaderboard-container h2 {
    color: #ffffff;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 0.8rem;
    text-align: left;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table th {
    opacity: 0.7;
    font-weight: 600;
}

.close-button {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    display: block;
    margin: 0 auto;
}

.close-button:hover {
    transform: scale(1.05);
}

/* Start Screen Styles */
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.start-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.molecule-logo {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.atom {
    display: inline-block;
}

.h { color: #3498db; }
.two { color: #ffffff; font-size: 2.5rem; }
.o { color: #e74c3c; }

.tagline {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.user-info {
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.game-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-option-button {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    border: none;
    padding: 1rem;
    font-size: 1rem;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-option-button:hover {
    transform: scale(1.05);
}

.game-option-button.logout {
    background: linear-gradient(45deg, #e74c3c, #f39c12);
}

.game-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
}

.game-info h2 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 1rem;
}

.game-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.game-info li {
    color: #ffffff;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Game UI Styles */
.game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    color: white;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 16px;
}

.stat-box.water span:last-child {
    font-size: 20px;
    line-height: 1;
    letter-spacing: 2px;
}

.exit-button {
    background: rgba(231, 76, 60, 0.7);
    border: none;
    padding: 0.5rem 1rem;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    margin-left: auto;
}

.timer-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0.5rem auto;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f1c40f);
    border-radius: 2px;
    transition: width 0.05s linear;
}

/* Game Over Screen */
.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.game-over-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 90%;
}

.game-over-container h1 {
    color: white;
    margin-top: 0;
}

.final-score {
    color: white;
    font-size: 1.5rem;
    margin: 1rem 0;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.stat {
    color: white;
    opacity: 0.8;
}

.save-button {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 0.5rem;
    width: 100%;
}

.restart-button {
    background: linear-gradient(45deg, #e74c3c, #f1c40f);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 0.5rem;
    width: 100%;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

.save-button:hover, .restart-button:hover, .back-button:hover {
    transform: scale(1.05);
}

.hidden {
    display: none;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.ad-container {
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    min-height: 90px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Yatay mod optimizasyonları */
@media screen and (orientation: landscape) {
    body.landscape-mode {
        font-size: 14px;
    }
    
    .auth-container {
        max-width: 600px;
        padding: 1.5rem;
    }
    
    .start-container {
        max-width: 700px;
        padding: 2rem;
    }
    
    .molecule-logo {
        font-size: 3rem;
        margin-bottom: 0.5rem;
    }
    
    .game-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .game-info {
        padding: 1rem;
    }
    
    .leaderboard-container {
        max-width: 800px;
        padding: 1.5rem;
    }
}

/* Küçük yatay ekranlar için özel ayarlar */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .auth-container {
        padding: 1rem;
        max-width: 90vw;
    }
    
    .start-container {
        padding: 1.5rem;
        max-width: 90vw;
    }
    
    .molecule-logo {
        font-size: 2.5rem;
        margin-bottom: 0.3rem;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .game-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .game-option-button {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .game-info {
        padding: 0.8rem;
    }
    
    .game-info h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .game-info li {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .game-over-container {
        padding: 1.5rem;
        max-width: 90vw;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .game-over-container h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .final-score {
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }
    
    .leaderboard-container {
        padding: 1rem;
        max-width: 90vw;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .leaderboard-table th, .leaderboard-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Mobil joystick ve kontroller için yatay mod stilleri */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #mobileJoystick {
        width: 18vw !important;
        height: 18vw !important;
        min-width: 60px !important;
        min-height: 60px !important;
        left: 8px !important;
        bottom: 8px !important;
    }
    
    #mobileArrowButtons {
        width: 150px !important;
        height: 150px !important;
        right: 8px !important;
        bottom: 8px !important;
    }
} 