/**
 * LEIBER Poland - Enhanced Driving Game
 * Main stylesheet
 */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: local('assets/fonts/montserrat/Montserrat-Regular.woff2') format('woff2');
  }
  
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    src: local('assets/fonts/montserrat/Montserrat-Medium.woff2') format('woff2');
  }
  
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    src: local('assets/fonts/montserrat/Montserrat-SemiBold.woff2') format('woff2');
  }
  
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    src: local('assets/fonts/montserrat/Montserrat-Bold.woff2') format('woff2');
  }

 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

/* Indexes for pages */
:root {
    --z-loading: 1000;
    --z-error: 950;
    --z-screens: 900;
    --z-settings: 1001;
    --z-hud: 100;
    --z-controls: 50;
    --z-game: 10;
    --z-background: 1;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    overflow: hidden;
    touch-action: none;
    color: #fff;
}

body, .control-btn, #left-btn, #right-btn, #boost-btn {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

/* Dodaj ten styl do istniejącego pliku CSS (styles.css) */

/* Styl dla linku w sekcji informacji o autorze */
.author-link {
    color: #4A90E2;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    border-bottom: 1px dotted rgba(74, 144, 226, 0.5);
}

.author-link:hover {
    color: #2a70c2;
    border-bottom: 1px solid rgba(42, 112, 194, 0.8);
}

.author-link:active {
    color: #1a60b2;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(to bottom, #5a8cb9, #a287b3, #e5a4b4);
}

/* Screen styles with modern blur effect */
#welcome-screen, #instructions-screen, #game-screen, #game-over-screen, #success-screen, #author-info-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#welcome-screen, #instructions-screen, #game-over-screen, #success-screen, #author-info-screen {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-screens);
}

#instructions-screen, #game-screen, #game-over-screen, #success-screen, #author-info-screen {
    opacity: 0;
    pointer-events: none;
}

.screen-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 90%;
    width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s;
}

#logo:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-align: center;
    max-width: 90%;
    line-height: 1.6;
}

.btn {
    background: linear-gradient(135deg, #4A90E2, #1E50B3);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #5AA0F2, #2E60C3);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    transform: rotate(30deg);
    transition: transform 0.5s;
    opacity: 0;
}

.btn:hover::after {
    transform: rotate(30deg) translate(100%, 100%);
    opacity: 1;
}

/* Game canvas */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-game);
}

/* Stats bar for score, time, etc */
#stats-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: var(--z-hud);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1.2rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.stat i {
    font-size: 1.4rem;
}

/* Controls */
#controls {
    position: absolute;
    bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: var(--z-controls);
    align-items: flex-end;
}

.left-control {
    margin: 0;
}

#right-side-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 0;
}

.boost-control {
    background: linear-gradient(135deg, #ff9900, #ff5500);
    /* width: 70px;
    height: 70px;
    position: absolute;
    top: 0;
    left: 100%;
    transform: translateX(-50%); */
}

.right-control {
    /* position: absolute;
    bottom: 0;
    left: 50%; */
    /* transform: translateX(-50%); */
}

.boost-control:active {
    background: linear-gradient(135deg, #ff7700, #ff3300);
    opacity: 0.9;
}

.control-btn {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.control-btn:active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 0.9;
}

/* Animated countdown */
#countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: white;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    z-index: var(--z-hud);
    opacity: 0;
    font-weight: 700;
    transition: all 0.3s;
}

/* Language selector */
#language-selector {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: var(--z-settings);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

#language-selector.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

/* Animations */
@keyframes countdownPulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    10% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.firework-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Settings button */
#settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    z-index: var(--z-settings);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

#settings-btn:hover {
    transform: rotate(30deg);
    background: rgba(0, 0, 0, 0.8);
}

/* Settings panel */
#settings-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    z-index: var(--z-settings);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    transform-origin: top right;
    transform: scale(0);
    opacity: 0;
    width: 300px;
}

#settings-panel.active {
    transform: scale(1);
    opacity: 1;
}

#settings-panel h3 {
    margin-bottom: 15px;
    color: white;
    font-size: 1.3rem;
    text-align: center;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-group label {
    display: block;
    margin-bottom: 10px;
    color: white;
    font-weight: 500;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-container input {
    flex: 1;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Boost meter */
#boost-meter {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    z-index: var(--z-controls);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#boost-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    transform-origin: left;
    transform: scaleX(1);
    transition: transform 0.3s linear;
}

#boost-label {
    position: absolute;
    bottom: 165px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Toast notifications */
#toast-container {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-hud);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-20px);
}

/* Loading screen */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #5a8cb9, #a287b3, #e5a4b4);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: var(--z-loading);
    transition: opacity 0.5s;
}

.loading-spinner {
    width: 100px;
    height: 100px;
    border: 10px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 10px solid white;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-progress {
    width: 300px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

#loading-progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    transition: width 0.3s;
}

/* Error alert */
#error-alert {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    z-index: var(--z-error);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    max-width: 90%;
    width: 500px;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

#error-alert h3 {
    color: #ff4444;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

#error-alert p {
    margin-bottom: 20px;
}

/* Enhanced explosion animation */
.explosion-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11;
    perspective: 1000px;
}

/* Animated explosion effect */
@keyframes explode-center {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

@keyframes explode-particle {
    0% { 
        transform: translate(0, 0) rotate(0deg) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0); 
        opacity: 0; 
    }
}

@keyframes explode-shock {
    0% { transform: scale(0); opacity: 0.7; }
    100% { transform: scale(5); opacity: 0; }
}

@keyframes explode-fire {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0.5); opacity: 0; }
}

@keyframes explode-smoke {
    0% { transform: scale(0.5) translateY(0); opacity: 0.8; }
    100% { transform: scale(2) translateY(-150px); opacity: 0; }
}

@keyframes flicker {
    0% { opacity: 1; }
    25% { opacity: 0.8; }
    50% { opacity: 0.9; }
    75% { opacity: 0.7; }
    100% { opacity: 1; }
}

.explosion-center {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,165,0,0.8) 40%, rgba(255,0,0,0.6) 70%, rgba(0,0,0,0) 100%);
    transform-origin: center;
    animation: explode-center 0.5s forwards, flicker 0.1s infinite;
    z-index: 20;
    box-shadow: 0 0 50px 20px rgba(255, 165, 0, 0.8);
}

.explosion-shock {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    transform-origin: center;
    animation: explode-shock 0.5s forwards;
    z-index: 19;
}

.explosion-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff5722;
    transform-origin: center;
    animation: explode-particle var(--duration) forwards;
    box-shadow: 0 0 10px 2px rgba(255, 87, 34, 0.6);
    z-index: 18;
}

.explosion-fire {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,165,0,0.9) 30%, rgba(255,69,0,0.7) 70%, rgba(0,0,0,0) 100%);
    transform-origin: center;
    animation: explode-fire 0.8s forwards, flicker 0.1s infinite;
    z-index: 17;
    box-shadow: 0 0 20px 10px rgba(255, 69, 0, 0.4);
}

.explosion-smoke {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(50,50,50,0.8) 0%, rgba(100,100,100,0.5) 50%, rgba(100,100,100,0) 100%);
    transform-origin: center bottom;
    animation: explode-smoke 2s forwards;
    z-index: 15;
}

@keyframes shockwave {
    0% { transform: scale(0); opacity: 0.9; }
    100% { transform: scale(2); opacity: 0; }
}

.shockwave {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.5);
    transform-origin: center;
    animation: shockwave 0.5s forwards;
    z-index: 16;
}

/* Car debris */
.car-debris {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #777;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transform-origin: center;
    animation: explode-particle var(--duration) forwards;
    z-index: 14;
}

/* Sound control UI */
#sound-control {
    position: absolute;
    top: 85px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    z-index: var(--z-settings);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

#sound-control:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Style dla rozbudowanej instrukcji */
.instructions-container {
    max-width: 90%;
    width: 900px; /* Zwiększona szerokość dla tabletów */
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.instruction-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.tab {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.tab.active {
    background: rgba(74, 144, 226, 0.7);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.instruction-section {
    margin-bottom: 30px;
}

.instruction-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #4A90E2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.instruction-section h3 {
    font-size: 1.4rem;
    margin: 20px 0 10px;
    color: rgba(255, 255, 255, 0.9);
}

.controls-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 180px;
}

.control-icon {
    width: 70px;
    height: 70px;
    min-height: 70px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.control-item p,
.powerup-info p,
.obstacle-info p {
    line-height: 1.5;
    text-align: center;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.boost-icon {
    background: linear-gradient(135deg, #ff9900, #ff5500);
}

.powerups-list,
.obstacles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.powerup-item,
.obstacle-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s;
}

.powerup-item:hover,
.obstacle-item:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(5px);
}

.powerup-icon,
.obstacle-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.boost-powerup {
    background: linear-gradient(135deg, #ff9900, #ff5500);
    color: white;
}

.shield-powerup {
    background: linear-gradient(135deg, #4444ff, #0000cc);
    color: white;
}

.obstacle-icon {
    background: linear-gradient(135deg, #ff3333, #cc0000);
    color: white;
}

.powerup-info h4,
.obstacle-info h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: white;
}

.score-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.score-list li {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    border-radius: 8px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4A90E2;
    margin-right: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.score-desc {
    flex: 1;
}

/* Author info screen styles */
#author-info-screen .screen-content {
    width: 700px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

#author-info-screen h1 {
    color: #4A90E2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

#author-info-screen h3 {
    font-size: 1.5rem;
    margin: 25px 0 15px;
    color: #ff9900;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

#author-info-screen p {
    margin-bottom: 15px;
    text-align: left;
    font-size: 1.1rem;
    width: 100%;
}

#author-info-screen strong {
    color: #4A90E2;
}

#author-info-screen .btn {
    margin-top: 20px;
}

/* License info button */
#license-info-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    z-index: var(--z-settings);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

#license-info-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#license-info-btn.hidden {
    display: none;
}

/* Media queries */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
    .control-btn {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
    
    .boost-control {
        width: 80px;
        height: 80px;
    }
    
    .instructions-container {
        width: 90%;
        padding: 25px;
    }
    
    #right-side-controls {
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .control-btn {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
    
    .boost-control {
        width: 80px;
        height: 80px;
    }
    
    .instructions-container {
        width: 90%;
        padding: 25px;
    }
    
    #right-side-controls {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    #stats-bar {
        top: 10px;
        padding: 8px 15px;
        gap: 15px;
    }
    
    .stat {
        font-size: 1rem;
    }
    
    .stat i {
        font-size: 1.2rem;
    }
    
    .control-btn {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .boost-control {
        width: 70px;
        height: 70px;
    }
    
    #boost-meter {
        width: 150px;
        bottom: 130px;
    }
    
    #boost-label {
        bottom: 145px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    #countdown {
        font-size: 6rem;
    }
    
    .instructions-container {
        width: 95%;
        padding: 20px;
    }
    
    .instruction-tabs {
        gap: 5px;
    }
    
    .tab {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .instruction-section h2 {
        font-size: 1.6rem;
    }
    
    .instruction-section h3 {
        font-size: 1.3rem;
    }
    
    .control-item {
        width: 150px;
    }
    
    .control-icon {
        width: 60px;
        height: 60px;
    }
    
    .powerup-item, 
    .obstacle-item {
        padding: 12px;
    }
    
    #right-side-controls {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .screen-content {
        padding: 30px 20px;
    }
    
    #stats-bar {
        width: 90%;
        justify-content: space-around;
    }
    
    .stat span {
        font-size: 0.9rem;
    }
    
    .control-btn {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .boost-control {
        width: 60px;
        height: 60px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    #logo {
        max-width: 200px;
    }
    
    .instructions-container {
        width: 95%;
        padding: 15px;
    }
    
    .instruction-tabs {
        gap: 5px;
    }
    
    .tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .control-item {
        width: 120px;
    }
    
    .control-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .powerup-icon,
    .obstacle-icon {
        width: 50px;
        height: 50px;
    }
    
    #right-side-controls {
        gap: 30px;
    }
}

/* iPad Pro 11-inch (M4) - Horizontal */
@media only screen and (min-device-width: 834px) and (max-device-width: 1194px) and (orientation: landscape), 
       only screen and (min-width: 1024px) and (max-width: 1194px) and (orientation: landscape) {
    /* Przyciski kontrolne */
    .control-btn {
        width: 100px;
        height: 100px;
        font-size: 2.4rem;
    }
    
    .boost-control {
        width: 90px;
        height: 90px;
    }
    
    /* Main screens */
    #welcome-screen, #instructions-screen, #game-over-screen, #success-screen, #author-info-screen {
        z-index: var(--z-screens);
    }
    
    /* Dostosowanie rozmieszczenia elementów sterujących */
    #controls {
        bottom: 100px;
        align-items: flex-end;
        padding: 0 50px;
    }
    
    .left-control {
        margin-left: 20px;
    }
    
    #right-side-controls {
        gap: 30px;
    }
    
    /* Element boost meter */
    #boost-meter {
        width: 250px;
        height: 12px;
        bottom: 170px;
    }
    
    #boost-label {
        bottom: 188px;
        font-size: 1.1rem;
    }
    
    /* Pasek statystyk */
    #stats-bar {
        top: 25px;
        gap: 40px;
        padding: 12px 25px;
    }
    
    .stat {
        font-size: 1.4rem;
    }
    
    .stat i {
        font-size: 1.6rem;
    }
    
    /* Style dla ekranu instrukcji */
    .instructions-container {
        width: 90%;
        max-width: 900px;
        padding: 30px;
    }
    
    .instruction-section h2 {
        font-size: 2rem;
    }
    
    .instruction-section h3 {
        font-size: 1.6rem;
    }
    
    .control-item {
        width: 200px;
    }
    
    .control-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    /* Poprawki dla przycisku licencji */
    #license-info-btn {
        bottom: 90px;
        left: 30px;
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

/* iPad Pro 11-inch (M4) - Vertical */
@media only screen and (min-device-width: 834px) and (max-device-width: 1194px) and (orientation: portrait),
       only screen and (min-width: 834px) and (max-width: 1024px) and (orientation: portrait) {
    /* Przyciski kontrolne */
    .control-btn {
        width: 95px;
        height: 95px;
        font-size: 2.2rem;
    }
    
    .boost-control {
        width: 85px;
        height: 85px;
    }
    
    /* Dostosowanie rozmieszczenia elementów sterujących */
    #controls {
        bottom: 150px;
        align-items: flex-end;
    }

    #right-side-controls {
        gap: 30px;
    }
    
    /* Element boost meter */
    #boost-meter {
        width: 220px;
        height: 12px;
        bottom: 165px;
    }
    
    #boost-label {
        bottom: 183px;
        font-size: 1.1rem;
    }
    
    /* Pasek statystyk */
    #stats-bar {
        top: 20px;
        gap: 30px;
        padding: 10px 20px;
    }
    
    .stat {
        font-size: 1.3rem;
    }
    
    .stat i {
        font-size: 1.5rem;
    }
    
    /* Style dla treści ekranów */
    .screen-content {
        max-width: 80%;
        padding: 35px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    p {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 15px 35px;
        font-size: 1.3rem;
    }
    
    /* Style dla ekranu instrukcji */
    .instructions-container {
        width: 90%;
        max-width: 700px;
    }
    
    .instruction-section h2 {
        font-size: 1.9rem;
    }
    
    .instruction-section h3 {
        font-size: 1.5rem;
    }
    
    /* Poprawki dla przycisku licencji */
    #license-info-btn {
        bottom: 90px;
        left: 25px;
        width: 55px;
        height: 55px;
        font-size: 1.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Optimisation for devices with reduced animations */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============= WSPARCIE DLA ORIENTACJI POZIOMEJ NA TELEFONACH ============= */
@media (max-height: 500px) and (orientation: landscape) {
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .boost-control {
        width: 50px;
        height: 50px;
    }
    
    #controls {
        bottom: 20px;
        padding: 0 30px;
    }
    
    #boost-meter {
        width: 140px;
        height: 6px;
        bottom: 90px;
    }
    
    #boost-label {
        bottom: 100px;
        font-size: 0.8rem;
    }
    
    #stats-bar {
        top: 5px;
        padding: 5px 10px;
        gap: 15px;
    }
    
    .stat {
        font-size: 0.8rem;
    }
    
    .stat i {
        font-size: 1rem;
    }
    
    .screen-content {
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    #countdown {
        font-size: 4rem;
    }
    
    #right-side-controls {
        gap: 15px;
    }
}

/* ============= TABLETY - LANDSCAPE ============= */
@media (min-width: 1024px) and (max-width: 1199px) {
    .control-btn {
        width: 85px;
        height: 85px;
        font-size: 2rem;
    }
    
    #controls {
        bottom: 40px;
    }
    
    #boost-meter {
        width: 200px;
        bottom: 140px;
    }
    
    #boost-label {
        bottom: 160px;
    }
    
    .instructions-container {
        width: 90%;
        max-width: 800px;
    }
}

/* ============= TABLETY - PORTRAIT ============= */
@media (min-width: 768px) and (max-width: 1023px) {
    .control-btn {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
    
    #controls {
        bottom: 120px;
    }
    
    #boost-meter {
        width: 180px;
        bottom: 140px;
    }
    
    #boost-label {
        bottom: 160px;
        font-size: 1rem;
    }
    
    #stats-bar {
        top: 15px;
        padding: 8px 20px;
        gap: 20px;
    }
    
    .stat {
        font-size: 1.1rem;
    }
    
    .stat i {
        font-size: 1.3rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    p {
        font-size: 1.1rem;
    }
    
    .instructions-container {
        width: 90%;
        padding: 20px;
    }
    
    .tab {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* ============= DUŻE TELEFONY (iPhone Pro Max, Samsung Note, etc.) ============= */
@media (min-width: 414px) and (max-width: 767px) {
    .control-btn {
        width: 75px;
        height: 75px;
        font-size: 1.7rem;
    }
    
    .boost-control {
        width: 65px;
        height: 65px;
    }
    
    #controls {
        bottom: 80px;
    }
    
    #boost-meter {
        width: 160px;
        height: 8px;
        bottom: 125px;
    }
    
    #boost-label {
        bottom: 140px;
        font-size: 0.9rem;
    }
    
    #stats-bar {
        top: 10px;
        padding: 8px 15px;
        gap: 15px;
        width: 90%;
    }
    
    .stat {
        font-size: 0.9rem;
    }
    
    .stat i {
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    #countdown {
        font-size: 5rem;
    }
    
    .screen-content {
        padding: 25px 20px;
        width: 90%;
    }
    
    .instructions-container {
        width: 95%;
        padding: 15px;
    }
    
    .instruction-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .tab {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 15px;
    }
    
    .instruction-section h2 {
        font-size: 1.5rem;
    }
    
    .instruction-section h3 {
        font-size: 1.2rem;
    }
    
    .control-item, .powerup-item, .obstacle-item {
        padding: 10px;
    }
    
    #right-side-controls {
        gap: 25px;
    }
}

/* ============= ŚREDNIE TELEFONY (iPhone 6/7/8/X/XS/11/12) ============= */
@media (min-width: 375px) and (max-width: 413px) {
    .control-btn {
        width: 70px;
        height: 70px;
        font-size: 1.6rem;
    }
    
    .boost-control {
        width: 60px;
        height: 60px;
    }
    
    #controls {
        bottom: 70px;
        padding: 0 15px;
    }
    
    #boost-meter {
        width: 150px;
        height: 8px;
        bottom: 120px;
    }
    
    #boost-label {
        bottom: 135px;
        font-size: 0.9rem;
    }
    
    #stats-bar {
        top: 10px;
        padding: 6px 12px;
        gap: 12px;
        width: 92%;
    }
    
    .stat {
        font-size: 0.85rem;
    }
    
    .stat i {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    .screen-content {
        padding: 20px 15px;
        width: 92%;
    }
    
    .instructions-container {
        width: 95%;
        padding: 12px;
    }
    
    .tab {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .control-item {
        width: 130px;
    }
    
    .control-icon {
        width: 55px;
        height: 55px;
    }
    
    .powerup-icon, .obstacle-icon {
        width: 45px;
        height: 45px;
    }
    
    #right-side-controls {
        gap: 22px;
    }
}

/* ============= MAŁE TELEFONY (iPhone 5/SE, Samsung Galaxy S5, etc.) ============= */
@media (max-width: 374px) {
    .control-btn {
        width: 65px;
        height: 65px;
        font-size: 1.5rem;
    }
    
    .boost-control {
        width: 55px;
        height: 55px;
    }
    
    #controls {
        bottom: 60px;
        padding: 0 10px;
    }
    
    #boost-meter {
        width: 140px;
        height: 7px;
        bottom: 110px;
    }
    
    #boost-label {
        bottom: 125px;
        font-size: 0.8rem;
    }
    
    #stats-bar {
        top: 8px;
        padding: 5px 10px;
        gap: 10px;
        width: 95%;
    }
    
    .stat {
        font-size: 0.8rem;
    }
    
    .stat i {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    #countdown {
        font-size: 4rem;
    }
    
    .screen-content {
        padding: 15px 10px;
        width: 95%;
    }
    
    .instructions-container {
        width: 98%;
        padding: 10px;
    }
    
    .tab {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .instruction-section h2 {
        font-size: 1.3rem;
    }
    
    .instruction-section h3 {
        font-size: 1.1rem;
    }
    
    .control-item {
        width: 110px;
    }
    
    .control-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .powerup-icon, .obstacle-icon {
        width: 40px;
        height: 40px;
    }
    
    .powerup-info h4, .obstacle-info h4 {
        font-size: 1.1rem;
    }
    
    #right-side-controls {
        gap: 20px;
    }
}

/* ============= WYSOKIE TELEFONY (iPhone 12/13 Pro Max, etc.) ============= */
@media (min-width: 390px) and (max-width: 428px) and (min-height: 800px) {
    #controls {
        bottom: 100px; /* Więcej miejsca na dole dla wysokich telefonów */
    }
    
    #boost-meter {
        bottom: 150px;
    }
    
    #boost-label {
        bottom: 165px;
    }
    
    .control-btn {
        width: 75px;
        height: 75px;
    }
    
    .boost-control {
        width: 65px;
        height: 65px;
    }
    
    #right-side-controls {
        gap: 30px;
    }
}

/* ============= WIĘKSZE ORIENTALNE TELEFONY (np. Xiaomi, Huawei) ============= */
@media (min-width: 393px) and (max-width: 450px) and (min-height: 830px) {
    #controls {
        bottom: 110px;
    }
    
    #boost-meter {
        bottom: 160px;
    }
    
    #boost-label {
        bottom: 175px;
    }
}

/* ============= SKŁADANE TELEFONY I DUŻE TABLETY W TRYBIE ZŁOŻONYM ============= */
@media (min-width: 700px) and (max-width: 767px) and (min-height: 500px) {
    .control-btn {
        width: 78px;
        height: 78px;
        font-size: 1.8rem;
    }
    
    #controls {
        bottom: 100px;
        padding: 0 30px;
    }
    
    #boost-meter {
        width: 180px;
        bottom: 140px;
    }
    
    #boost-label {
        bottom: 155px;
    }
}