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

body {
    font-family: 'Pixelated', Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    width: 100%;
    max-width: 800px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

#age-display {
    font-size: 24px;
    margin-bottom: 5px;
}

#year-display {
    font-size: 18px;
    color: #666;
}

.game-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 300px;
    margin-bottom: 20px;
    padding-bottom: 60px;
}

.pointing-arrow {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('assets/arrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 50;
    animation: arrowBounce 1.5s ease-in-out infinite;
    pointer-events: none;
    transform-origin: center;
}

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

.location {
    width: 40%;
    height: 200px;
    border: 3px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: white;
    position: relative;
}

.location:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.location:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #FF9800, #F44336);
    opacity: 0;
    transition: opacity 0.3s;
}

.location:hover:before {
    opacity: 1;
}

.location-image {
    width: 100%;
    height: 150px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.location:hover .location-image {
    transform: scale(1.05);
}

#home-image {
    background-image: url('assets/home.png');
    background-size: cover;
    background-position: center;
}

#activity-image {
    background-size: cover;
    background-position: center;
}

.location-name {
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.character {
    width: 60px;
    height: 80px;
    background-image: url('assets/character.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    left: calc(20% - 30px);
    bottom: 10px;
    transition: left 1s, transform 0.5s;
    z-index: 10;
    transform: scaleX(1); /* По умолчанию смотрит влево */
}

.character.moving-right {
    left: calc(80% - 30px);
    transform: scaleX(-1); /* Отражаем по горизонтали когда движется вправо */
}

@keyframes bounce {
  0%, 100% { margin-bottom: 0; }
  50% { margin-bottom: 10px; }
}

.character {
    animation: bounce 0.8s ease-in-out infinite;
}

.road {
    position: absolute;
    height: 10px;
    background-color: #555;
    width: 60%;
    left: 20%;
    bottom: 35px;
    border-radius: 5px;
}

.road:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 2px;
    background: repeating-linear-gradient(to right, #fff, #fff 10px, transparent 10px, transparent 20px);
    transform: translateY(-50%);
}

.progress-bar {
    height: 20px;
    width: 100%;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background-color: #4CAF50;
    transition: width 0.3s;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 95%;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.popup-image {
    max-width: 100%;
    margin: 20px 0;
    border-radius: 5px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.popup-image img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 5px;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.close:hover {
    color: #E91E63;
    transform: rotate(90deg);
}

/* Стили для квиза */
.quiz-container {
    max-width: 600px;
    width: 90%;
    padding: 30px;
}

.nin-theme {
    background-color: #f5f5f7;
    color: #333;
    border: none;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    max-width: 650px;
    border-radius: 10px;
}

.nin-theme h2 {
    color: #333;
    font-family: "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.5px;
    text-transform: none;
    font-weight: 500;
    margin-bottom: 25px;
    text-align: center;
}

.nin-theme .option-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    padding: 15px 20px;
    text-align: left;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nin-theme .option-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nin-theme .option-btn.selected {
    background-color: #3498db;
    border-color: #2980b9;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.nin-theme .nav-btn {
    background-color: #3498db;
    color: white;
    font-family: "Helvetica Neue", Arial, sans-serif;
    border-radius: 25px;
    padding: 12px 25px;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: none;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.nin-theme .nav-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.nin-logo {
    margin: 10px 0 20px 0;
    position: relative;
    display: inline-block;
}

.result-message p {
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #333;
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
}

.quiz-question {
    display: none;
    margin-bottom: 20px;
}

.quiz-question:first-child {
    display: block;
}

.quiz-question p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    font-family: "Helvetica Neue", Arial, sans-serif;
    text-align: left;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 550px;
    margin: 0 auto;
}

.option-btn {
    padding: 15px 20px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    text-align: left;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background-color: #e9f5ff;
    border-color: #2196F3;
    transform: translateY(-2px);
}

.option-btn.selected {
    background-color: #2196F3;
    border-color: #0d8bf2;
    color: white;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.quiz-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.nav-btn {
    padding: 12px 25px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #45a049;
}

#quiz-result {
    padding: 20px 0;
}

#quiz-result h3 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.loading-bar {
    height: 6px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 3px;
    margin: 30px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #3498db, #2980b9, #3498db);
    transition: width 3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.result-message {
    margin-top: 30px;
    opacity: 0;
    transition: opacity 1s;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.highlight-text {
    font-size: 24px;
    color: #3498db;
    font-weight: 600;
    margin: 25px 0;
    letter-spacing: 0.5px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    position: relative;
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 4px;
}

.highlight-text:after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #3498db, #2980b9, #3498db);
}

.gift-button {
    display: inline-block;
    padding: 16px 32px;
    background-color: #3498db;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 16px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin-top: 25px;
    transition: all 0.3s;
    border: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.gift-button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.gift-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 87, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

@keyframes flash {
    0% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .popup-content {
        padding: 15px;
        width: 95%;
    }
    
    .popup-image {
        min-height: 150px;
        max-height: 300px;
    }
    
    h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .password {
        font-size: 24px !important;
        padding: 10px !important;
    }
    
    .quiz-container {
        padding: 15px !important;
    }
    
    .option-btn {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
    
    .game-container {
        padding: 10px;
    }
    
    .location {
        height: 180px;
    }
    
    .location-image {
        height: 130px;
    }
    
    .highlight-text {
        font-size: 20px !important;
    }
}

.highlight {
    animation: flash 1.5s infinite;
    border: 3px solid gold;
}