/* Quest main styles */

:root {
  /* Пастельная палитра */
  --pastel-peach: #FED6BC;      /* Нежно-персиковый */
  --pastel-yellow: #FFFADD;     /* Светло-желтый */
  --pastel-sky: #DEF7FE;        /* Пастельно-небесный */
  --pastel-lilac: #E7ECFF;      /* Светло-лиловый */
  --pastel-lime: #C3FBD8;       /* Салатовый */
  --pastel-pink: #FDEED9;       /* Нежно-розовый */
  --pastel-lime-white: #F6FFF8; /* Лаймовый */
  --pastel-aqua: #B5F2EA;       /* Аквамариновый */
  --pastel-purple: #C6D8FF;     /* Сиреневый */
  
  /* Акценты */
  --accent-dark: #8B7355;
  --accent-medium: #A89080;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-sky) 100%);
    min-height: 100vh;
    color: var(--accent-dark);
}

.quest-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.quest-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.quest-header h1 {
    font-size: 2.5rem;
    color: var(--accent-dark);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.quest-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.2rem;
    flex-wrap: wrap;
}

.progress-bar {
    width: 300px;
    height: 25px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #ff9ff3);
    transition: width 0.5s ease;
    border-radius: 15px;
}

/* Main area */
.quest-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.quest-layout {
    display: grid;
    grid-template-columns: 400px 1fr auto;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

.quest-map-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    height: 100%;
    width: 400px;
}

.quest-center-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 0;
    height: 100%;
}

.quest-results-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

/* Route container */
.route-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* CSS-based route path */
.route-path-css {
    position: absolute;
    left: 74px;
    top: 60px;
    bottom: 60px;
    width: 6px;
    background: repeating-linear-gradient(
        to bottom,
        var(--pastel-lime) 0,
        var(--pastel-lime) 20px,
        transparent 20px,
        transparent 30px
    );
    border-radius: 3px;
    z-index: 0;
    animation: pathPulse 2s ease-in-out infinite;
}

@keyframes pathPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.route-points-css {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
}

.route-point-css {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 10px 0;
    transition: transform 0.2s ease;
    position: relative;
}

.route-point-css:hover {
    transform: translateX(5px);
}

.route-point-css.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.route-point-flower {
    font-size: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    left: 37px;
}

.route-point-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-dark);
    margin-left: 32px;
}

/* Point description */
.point-description {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: slideUp 0.4s ease;
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

.point-description.compact {
    max-height: none;
}

.point-description.hidden {
    display: none;
}

/* No point selected hint */
.no-point-selected {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed var(--pastel-peach);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.no-point-selected.hidden {
    display: none;
}

.hint-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.hint-icon {
    font-size: 60px;
    animation: float 3s ease-in-out infinite;
}

.no-point-selected p {
    font-size: 1.1rem;
    color: var(--accent-dark);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.description-content {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--pastel-peach);
    color: var(--accent-dark);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.1);
    background: var(--pastel-pink);
}

#point-title {
    font-size: 1.4rem;
    color: var(--accent-dark);
    margin-bottom: 15px;
}

.point-graphic {
    font-size: 50px;
    margin: 15px 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#point-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 10px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-start {
    background: linear-gradient(135deg, var(--pastel-sky) 0%, var(--pastel-purple) 100%);
    color: var(--accent-dark);
}

.btn-reset {
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-pink) 100%);
    color: var(--accent-dark);
    margin-top: 20px;
}

/* Results panel */
.results-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.results-panel h2 {
    text-align: center;
    color: var(--accent-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.btn-reset {
    margin-top: auto;
    flex-shrink: 0;
}

.result-item-vertical {
    background: linear-gradient(135deg, var(--pastel-sky) 0%, var(--pastel-lilac) 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.result-label {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-dark);
    margin-bottom: 5px;
}

.result-value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-dark);
}

/* Victory screen */
.victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-pink) 50%, var(--pastel-peach) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.victory-screen.hidden {
    display: none;
}

.victory-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.victory-content h1 {
    font-size: 3rem;
    color: var(--accent-dark);
    margin-bottom: 10px;
}

.victory-content h2 {
    font-size: 1.8rem;
    color: var(--accent-medium);
    margin-bottom: 30px;
}

.victory-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.victory-stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--accent-medium);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-dark);
}

.victory-message {
    font-size: 1.3rem;
    color: var(--accent-dark);
    margin-bottom: 30px;
    font-style: italic;
}

.btn-play-again {
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-pink) 100%);
    color: var(--accent-dark);
    font-size: 1.3rem;
    padding: 15px 40px;
}

/* Game container */
.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-sky) 100%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.game-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--pastel-peach);
    color: var(--accent-dark);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 3001;
    transition: transform 0.2s ease;
}

.game-close-btn:hover {
    transform: scale(1.1);
}

/* Fall animation for gather games */
@keyframes fall {
    to {
        transform: translateY(70vh) rotate(360deg);
    }
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall 3s linear forwards;
    z-index: 3000;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Slide down animation for success message */
@keyframes slideDown {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Word card flip animation */
@keyframes cardFlip {
    from { transform: rotateY(0); }
    to { transform: rotateY(180deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .quest-layout {
        grid-template-columns: 1fr 1fr;
    }

    .quest-map-column {
        width: 100%;
        align-items: center;
    }

    .route-container {
        align-items: center;
    }

    .route-path-css {
        left: 50%;
        transform: translateX(-50%);
    }

    .route-point-flower {
        left: 0;
    }

    .quest-results-column {
        grid-column: 1 / -1;
        order: -1;
    }

    .quest-center-column {
        order: 2;
    }

    .quest-map-column {
        order: 3;
    }

    .results-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .quest-layout {
        grid-template-columns: 1fr;
    }

    .quest-map-column {
        order: 2;
    }

    .quest-center-column {
        order: 1;
    }

    .quest-results-column {
        order: 3;
    }

    .results-panel {
        position: static;
    }

    /* Hide labels on mobile */
    .route-point-title {
        display: none;
    }

    .point-description {
        padding: 15px;
    }

    #point-title {
        font-size: 1.2rem;
    }

    .point-graphic {
        font-size: 40px;
    }

    .victory-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .victory-content h1 {
        font-size: 2rem;
    }

    .victory-stats {
        flex-direction: column;
        gap: 20px;
    }

    .modal-content {
        width: 95vw;
        height: 85vh;
    }
}

/* Welcome Modal Styles */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-lilac) 50%, var(--pastel-sky) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease;
}

.welcome-modal.hidden {
    display: none;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(139, 115, 85, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.6s ease;
}

.welcome-header {
    margin-bottom: 20px;
}

.welcome-flower {
    font-size: 4rem;
    display: block;
    margin-bottom: 10px;
    animation: flowerPulse 2s ease infinite;
}

.welcome-header h1 {
    font-size: 2.5rem;
    color: var(--accent-dark);
}

.welcome-text {
    font-size: 1.2rem;
    color: var(--accent-medium);
    margin-bottom: 30px;
    line-height: 1.6;
}

.welcome-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.welcome-label {
    font-size: 1.3rem;
    color: var(--accent-dark);
    font-weight: 600;
}

.welcome-input {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 3px solid var(--pastel-peach);
    border-radius: 15px;
    outline: none;
    text-align: center;
    transition: all 0.3s ease;
    background: #FFF;
}

.welcome-input:focus {
    border-color: var(--pastel-purple);
    box-shadow: 0 0 15px rgba(198, 216, 255, 0.5);
}

.welcome-input::placeholder {
    color: var(--accent-medium);
    opacity: 0.7;
}

.name-error {
    color: #e74c3c;
    font-size: 1rem;
    font-weight: 600;
    animation: shake 0.5s ease;
}

.name-error.hidden {
    display: none;
}

.btn-welcome {
    background: linear-gradient(135deg, var(--pastel-lime) 0%, var(--pastel-aqua) 100%);
    color: var(--accent-dark);
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 5px 20px rgba(195, 251, 216, 0.4);
}

.btn-welcome:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(195, 251, 216, 0.6);
}

.btn-welcome:active {
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

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

.game-2{
    background: url(../img/back2.jpg) 0% 0% / cover !important;
}