@import url('https://fonts.googleapis.com/css2?family=Joti+One:wght@400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    --card-gradient: linear-gradient(145deg, rgba(0, 0, 0, 0.4), rgba(20, 20, 40, 0.3));
    --border-color: rgba(255, 255, 255, 0.1);
    --text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
    --color-success: #00b894;
    --color-danger: #e74c3c;
    --color-info: #3498db;
    --color-gold: #ffd700;
    --color-hunter: #ff6b35;
}

body {
    font-family: "Joti One", serif;
    background: var(--primary-gradient);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 10px;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Base Button Styles */
.btn {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-family: "Joti One", serif;;
    text-transform: uppercase;
    font-weight: bold;
    backdrop-filter: blur(10px);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.btn:active {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn--large {
    padding: 18px 30px;
    font-size: 1.2rem;
    width: 100%;
    margin: 8px 0;
}

.btn--medium {
    padding: 12px 25px;
    font-size: 1rem;
    width: 100%;
    margin: 6px 0;
}

.btn--square {
    border-radius: 12px;
    min-width: 50px;
    min-height: 50px;
    padding: 10px;
}

.btn--control {
    border-radius: 8px;
    min-width: 45px;
    min-height: 45px;
    padding: 8px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--control span {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 500;
}

#muteBtn.muted {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--color-danger);
}

/* Game Board */
.game-board {
    display: grid;
    gap: 6px;
    justify-content: center;
    padding: 10px;
    background: var(--card-gradient);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    margin-bottom: 15px;
}

/* Remove unused styles and keep only what's needed */

.btn--close {
    border-radius: 50%;
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    font-size: 1.2rem;
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.hidden {
    display: none !important;
}

/* Card Container */
.card-container {
    background: var(--card-gradient);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    margin: 10px 0;
}

/* Text Styles */
.menu-title {
    font-size: 3rem;
    color: #ffffff;
    text-shadow: var(--text-shadow);
    letter-spacing: 2px;
    line-height: 1;
    text-align: center;
    margin: 20px 0;
}

.title-line {
    display: block;
}

.section-label {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* Menu Styles */
.menu {
    flex: 1;
    padding: 20px;
    animation: fadeIn 1s ease-out;
}

.menu-header {
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.menu-section {
    background: var(--card-gradient);
    padding: 25px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    backdrop-filter: blur(15px);
    box-shadow: var(--box-shadow);
}

.menu-section > * {
    margin: 25px 0;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 30px;
}

/* Game Layout */
.game-container {
    flex: 1;
    padding: 15px;
    animation: fadeIn 0.8s ease-out;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--card-gradient);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.game-title {
    font-size: 1.4rem;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    line-height: 1.2;
}

.game-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Target Section */
.target-section {
    background: var(--card-gradient);
    border-radius: 15px;
    border: 2px solid var(--color-hunter);
    padding: 10px 15px;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.left {
    /* el1 zostaje po lewej */
}

.center {
    margin: 0 auto;
    /* el2 jest wyśrodkowany */
}

.right {
    display: flex;
    gap: 8px; /* odstęp między el3, el4, el5 */
}

.target-mouse-image-full {
    height: 100%;
    display: flex;
    align-items: center;
}

.target-mouse-image-full img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.countdown-container {
    background: var(--card-gradient);
    border: 2px solid var(--color-gold);
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-timer {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: countdownPulse 1s ease-in-out infinite;
}

.btn--control {
    border-radius: 8px;
    min-width: 45px;
    min-height: 45px;
    padding: 4px;
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn--control span {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 1.8rem;
    line-height: 1;
}

#muteBtn.muted {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--color-danger);
}

/* Remove unused styles */

/* Game Board */
.game-board {
    display: grid;
    gap: 6px;
    justify-content: center;
    padding: 10px;
    background: var(--card-gradient);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    margin-bottom: 15px;
}

/* Hunter Cards */
.hunter-card {
    background: rgba(40, 40, 60, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.hunter-card:active:not(.revealed):not(.found) {
    transform: scale(1.05);
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.hunter-card.revealed {
    border-color: var(--color-info);
    background: rgba(52, 152, 219, 0.2);
}

.hunter-card.found {
    border-color: var(--color-success);
    background: rgba(0, 184, 148, 0.2);
    animation: foundPulse 0.6s ease-in-out;
}

.hunter-card.wrong {
    border-color: var(--color-danger);
    background: rgba(231, 76, 60, 0.2);
    animation: wrongShake 0.5s ease-in-out;
}

.hunter-card.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 7px;
    transition: all 0.4s ease;
    backface-visibility: hidden;
}

.card-front {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
    opacity: 0;
}

.hunter-card.revealed .card-front {
    transform: rotateY(180deg);
    opacity: 0;
}

.hunter-card.revealed .card-back {
    transform: rotateY(0deg);
    opacity: 1;
}

.card-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* Slider */
.slider-container {
    margin: 15px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    outline: none;
    cursor: pointer;
    appearance: none;
    transition: var(--transition);
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 0 30px rgba(102, 126, 234, 0.4);
    transition: var(--transition);
    border: 2px solid #667eea;
}

/* Menu Icons */
.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
}

.menu-icon span {
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* Instructions & Ranking */
.instructions-container,
.ranking-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.instructions-header,
.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.instructions-header h2,
.ranking-header h2 {
    font-size: 2rem;
    color: var(--color-hunter);
    text-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

.instructions-content {
    line-height: 1.6;
    font-size: 1rem;
}

.instructions-content h3 {
    color: var(--color-gold);
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
}

.instructions-content p {
    margin-bottom: 10px;
    opacity: 0.9;
}

.ranking-content {
    text-align: center;
    padding: 50px 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

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

.modal.hidden {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-content {
    background: var(--card-gradient);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    text-align: center;
    max-width: 90%;
    width: 350px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* Special Elements */
.victory {
    text-align: center;
    margin: 15px 0;
    animation: bounceIn 1s ease-out;
    padding: 20px;
    background: linear-gradient(145deg, rgba(0, 255, 127, 0.1), rgba(0, 200, 100, 0.05));
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 127, 0.3);
}

.victory-text {
    font-size: 1.5rem;
    color: #00ff7f;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(0, 255, 127, 0.5);
}

.special-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 15px rgba(255, 215, 0, 0.7);
    z-index: 1000;
    pointer-events: none;
    animation: specialPulse 2s ease-out;
    opacity: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    max-width: 90%;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes foundPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes specialPulse {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.8) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}