/* Podstawowe style */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Bangers', cursive;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* Ukryj pierwszy canvas podczas ładowania */
body > canvas {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 20px;
}

/* Nagłówek gry */
.games-header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.games-header h1 {
    font-family: 'Bangers', cursive;
    font-size: 3em;
    color: #2C1810;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2em;
    color: #5a3921;
    margin-top: 1rem;
}


/* Kontener gry */
.game-container {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
                url('../../assets/images/jungle-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-top: 20px;
}

#gameCanvas {
    position: relative;
    width: 100%;
    height: 100%;
}

#gameCanvas canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: 20px;
    image-rendering: optimizeQuality !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.game-container canvas {
    image-rendering: auto !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Interfejs gry */
.game-ui {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
}

.game-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-stats div {
    font-size: 24px;
    color: #2C1810;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* Game Over */
.game-over {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 200;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
    min-width: 300px;
}

.game-over.show {
    display: block;
}

.game-over-content {
    color: #2C1810;
}

.game-over h2 {
    font-size: 32px;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.game-over div {
    font-size: 24px;
    margin: 10px 0;
}

.game-over-hint {
    margin-top: 30px !important;
    color: #666;
    font-size: 20px !important;
}

/* Responsywność */
@media (max-width: 768px) {
    .game-container {
        height: 450px;
    }

    .games-header h1 {
        font-size: 2em;
    }
}

/* Stopka */
.footer-content {
    margin-top: 50px;
    color: white;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    color: white;
    font-size: 24px;
}



/* Sekcje stopki */
.footer-section {
    margin: 20px 0;
}

.footer-section h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 5px 0;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Główne style gry */
.games-header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.games-header h1 {
    font-family: 'Bangers', cursive;
    font-size: 3em;
    color: #2C1810;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.games-header .subtitle {
    font-size: 1.5em;
    color: #ffd700;
    margin-top: 0;
}

/* Wybór postaci */
.character-selection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
                url('../../assets/images/jungle-bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
}

.character-selection-header {
    text-align: center;
    padding: 20px;
    color: #2C1810;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

.character-selection-header h1 {
    font-size: 48px;
    margin: 0;
}

.character-selection-body {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.characters-grid {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.character-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 200px;
    flex-shrink: 0;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 1);
}

.character-card.selected {
    background: rgba(255, 215, 0, 0.9);
    transform: scale(1.05);
}

.character-image {
    font-size: 48px;
    margin-bottom: 10px;
}

.character-card h4 {
    font-size: 24px;
    margin: 10px 0;
    color: #333;
}

.character-card p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Przyciski */
.start-btn, .control-btn {
    background: linear-gradient(135deg, #ffd452 0%, #ff9b44 100%);
    color: #2C1810;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    font-weight: bold;
}

.start-btn:hover, .control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,155,68,0.4);
}

.start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Interfejs gry */
.game-ui {
    max-width: 800px;
    margin: 1rem auto;
    padding: 1rem;
}

.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-item {
    background: white;
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stats-label {
    color: #666;
    font-size: 0.9em;
    display: block;
    margin-bottom: 0.3rem;
}

.stats-value {
    color: #2C1810;
    font-size: 1.2em;
    font-weight: bold;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Modalne okna */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal h2 {
    color: #2C1810;
    margin-bottom: 1.5rem;
}

.level-stats, .final-stats {
    margin: 1.5rem 0;
}

.fun-fact {
    background: #fff5f0;
    padding: 1rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.fun-fact h3 {
    color: #2C1810;
    margin-bottom: 0.5rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .games-header h1 {
        font-size: 2.5em;
    }

    .character-selection {
        padding: 1rem;
    }

    .characters-grid {
        flex-direction: column;
        max-width: 600px;
    }
    
    .character-card {
        width: 80%;
        max-width: 300px;
    }

    .game-controls {
        flex-direction: column;
    }

    .control-btn {
        width: 100%;
    }
}

/* Kontener gry */
#gameContainer {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.footer-section {
    margin: 20px 0;
}

.footer-section h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 5px 0;
}

.footer-section a:hover {
    color: #ffd700;
}

.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

.game-stats {
    font-family: 'Bangers', cursive;
    font-size: 1.5em;
    letter-spacing: 1px;
}

.game-stats i {
    color: #ffd700;
    margin-right: 5px;
}

.user-status {
    display: flex;
    align-items: center;
}

.user-logged {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

.user-icon {
    font-size: 1.2em;
}

.user-text {
    color: white;
    font-size: 1em;
}

.logout-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #cc0000;
}

.login-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.login-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.games-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.5);
}

.games-header .subtitle {
    font-size: 1.5em;
    color: #ffd700;
    margin-top: 0;
}

.game-container {
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}



/* Dostosowanie kontenera głównego */
.container {
    padding-top: 20px;
}

/* Profil użytkownika */
.user-profile {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
} 