/* OIT Snake Game - Complete System Styles */
/* Version 3.1.0 - WEIHNACHTS EDITION */

@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@300;400;500;600;700;800&display=swap');

/* WordPress Admin Bar ausblenden */
#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}

body {
    padding-top: 0 !important;
}

body.admin-bar {
    margin-top: 0 !important;
}

:root {
    --oit-light-blue: #C41E3A;
    --oit-deep-blue: #165B33;
    --oit-grey: #fff;
    --oit-orange: #0b3d68;
    --oit-white: #FFFFFF;
    --oit-black: #000000;
}

/* Body auf Schwarz */
body {
    background: #000000 !important;
    color: #ffffff;
}

/* Schneefall Animation - HINTER dem Spielfeld */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 1;
    user-select: none;
    cursor: default;
    animation-name: snowfall;
    animation-duration: 10s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    color: #FFFFFF;
    font-size: 1em;
    pointer-events: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(0vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.8;
    }
}

/* OIT Logo */
.oit-logo-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.oit-logo {
    display: inline-block;
    width: 120px;
    height: 120px;
    background-image: url('https://bbfrg5k.myrdbx.io/wp-content/uploads/2025/11/image-removebg-preview.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Auth Container - ÜBER dem Schnee */
.oit-snake-auth-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    font-family: 'Dosis', sans-serif;
    position: relative;
    z-index: 10;
}

.oit-snake-auth-box {
    background: #1a1a1a;
    border: 2px solid #0b3d68;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(11, 61, 104, 0.2);
}

.oit-logo svg {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 30px;
}

.oit-snake-auth-box h2 {
    color: #0b3d68;
    font-weight: 700;
    font-size: 2em;
    text-align: center;
    margin-bottom: 10px;
}

.oit-snake-auth-box .subtitle {
    color: #cccccc;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Tabs */
#auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #333333;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #999999;
    font-family: 'Dosis', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #0b3d68;
}

.tab-btn.active {
    color: #0b3d68;
    border-bottom-color: #0b3d68;
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--oit-grey);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Dosis', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0b3d68;
}

.form-group small {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
}

.form-group label input[type="checkbox"] {
    margin-right: 8px;
}

.form-group a {
    color: #0b3d68;
    text-decoration: none;
}

.form-group a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #0b3d68 0%, #073050 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-family: 'Dosis', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 61, 104, 0.4);
}

.btn-secondary {
    background: var(--oit-grey);
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #0b3d68;
    text-decoration: none;
    font-size: 0.95em;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Messages */
.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Verification Notice */
.oit-snake-verification {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: #1a1a1a;
    border: 2px solid #0b3d68;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(11, 61, 104, 0.2);
    text-align: center;
    font-family: 'Dosis', sans-serif;
    position: relative;
    z-index: 10;
}

.oit-snake-verification h2 {
    color: #0b3d68;
    font-weight: 700;
    margin-bottom: 20px;
}

.oit-snake-verification p {
    color: #cccccc;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.oit-snake-verification a {
    color: #0b3d68;
    text-decoration: none;
    margin-top: 20px;
    display: inline-block;
}

/* Game Container - ÜBER dem Schnee */
#snake-game-app {
    font-family: 'Dosis', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.game-header {
    background: linear-gradient(135deg, #165B33 0%, #0f3d21 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}

.user-info a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.user-info a:hover {
    opacity: 1;
    text-decoration: underline;
}

.game-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.game-section {
    flex: 1;
    min-width: 320px;
}

.score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    border-radius: 10px;
    color: white;
    font-size: 1.2em;
    font-weight: 700;
}

#gameCanvas {
    border: 4px solid #165B33;
    border-radius: 10px;
    display: block;
    background: #000000;
    box-shadow: 0 5px 15px rgba(22, 91, 51, 0.3);
    width: 100%;
    max-width: 800px;
}

.controls {
    margin-top: 15px;
    text-align: center;
}

.controls button {
    margin: 5px;
}

/* Game Buttons - Grün/Rot im gleichen Stil */
#startBtn {
    background: linear-gradient(135deg, #165B33 0%, #0f3d21 100%) !important;
    color: white !important;
    width: auto !important;
    padding: 14px 30px !important;
    border: none !important;
    border-radius: 25px !important;
    font-family: 'Dosis', sans-serif !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

#startBtn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(22, 91, 51, 0.4) !important;
}

#pauseBtn {
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%) !important;
    color: white !important;
    width: auto !important;
    padding: 14px 30px !important;
    border: none !important;
    border-radius: 25px !important;
    font-family: 'Dosis', sans-serif !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

#pauseBtn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4) !important;
}

.instructions {
    margin-top: 15px;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 10px;
    font-size: 0.9em;
    color: #ffffff;
}

.instructions h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 700;
}

.instructions p {
    color: #ffffff;
}

/* Leaderboard */
.leaderboard-section {
    flex: 0 0 350px;
}

.leaderboard {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 10px;
    padding: 20px;
    max-height: 700px;
    overflow-y: auto;
}

.leaderboard h2 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
    font-weight: 700;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    color: #ffffff;
}

.leaderboard-entry:hover {
    transform: translateX(5px);
    border-color: #0b3d68;
}

.rank {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.2em;
    min-width: 30px;
}

.player-name {
    flex: 1;
    margin: 0 15px;
}

.player-games {
    color: #888888;
    font-size: 0.9em;
    margin-right: 10px;
}

.score {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1em;
}

/* Snake in Weihnachtsfarben */
.snake-segment {
    background-color: #165B33 !important;
}

.snake-head {
    background-color: #C41E3A !important;
}

.snake-eye {
    background-color: #ffffff !important;
}

.snake-eye::after {
    background-color: #000000 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .oit-snake-auth-box {
        padding: 30px 20px;
    }
    
    .game-container {
        flex-direction: column;
    }
    
    .leaderboard-section {
        flex: 1;
    }
    
    #gameCanvas {
        max-width: 100%;
    }
}