/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(135deg, #16a085 0%, #3498db 50%, #d4a574 100%);
    color: #e0e0e0;
    min-height: 100vh;
    position: relative;
}

/* Фон с эффектами отдыха */
.relax-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 20%, rgba(22, 160, 133, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 165, 116, 0.2) 0%, transparent 60%);
    background-size: 700px 700px, 500px 500px, 800px 800px;
    animation: relaxWave 20s ease-in-out infinite;
}

@keyframes relaxWave {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    max-width: 100vw;
    width: 100%;
}

/* Screen management */
.screen {
    display: none;
    width: 100%;
    max-width: 100%;
    min-height: 90vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Главный экран */
.main-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 248, 245, 0.98) 100%);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(22, 160, 133, 0.4);
    border: 3px solid rgba(52, 152, 219, 0.6);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.main-title {
    font-family: 'Caveat', cursive;
    font-size: 3rem;
    font-weight: 700;
    color: #16a085;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(22, 160, 133, 0.4);
    margin-bottom: 10px;
    transform: rotate(-1deg);
}

.subtitle {
    font-style: italic;
    color: #3498db;
    font-size: 1.1rem;
    transform: rotate(0.5deg);
}

.page-content {
    position: relative;
    z-index: 1;
}

.intro-text {
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #16a085;
}

.relax-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.relax-icon {
    font-size: 4.5rem;
    animation: beachFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(22, 160, 133, 0.6));
}

@keyframes beachFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    25% { 
        transform: translateY(-8px) rotate(-3deg);
        opacity: 0.95;
    }
    50% { 
        transform: translateY(-4px) rotate(3deg);
        opacity: 1;
    }
    75% { 
        transform: translateY(-12px) rotate(-2deg);
        opacity: 0.98;
    }
}

/* Кнопки */
.btn {
    position: relative;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    width: 100%;
}

.sticker-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 
        0 8px 20px rgba(231, 76, 60, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid #a93226;
    margin-bottom: 15px;
}

.start-btn {
    background: linear-gradient(45deg, #16a085, #3498db);
    color: white;
    box-shadow: 
        0 8px 20px rgba(22, 160, 133, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid #138d75;
}

.retake-btn {
    background: linear-gradient(45deg, #1abc9c, #3498db);
    color: white;
    box-shadow: 
        0 8px 20px rgba(26, 188, 156, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid #16a085;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:hover .btn-glow {
    left: 100%;
}

/* Экран теста */
.test-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    flex: 1;
}

.test-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        inset 0 2px 10px rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(52, 152, 219, 0.4);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.question-counter {
    text-align: center;
    font-weight: 600;
    color: #16a085;
    margin-bottom: 15px;
    font-size: 1rem;
}

.question-text {
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    line-height: 1.5;
    color: #16a085;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.answer-option {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #138d75;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 50px;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.answer-option:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(52, 152, 219, 0.6);
    background: rgba(255, 255, 255, 1);
}

.answer-option.selected {
    background: linear-gradient(45deg, #16a085, #3498db);
    color: white;
    border-color: #138d75;
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(22, 160, 133, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Экран результата */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.result-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(22, 160, 133, 0.4);
    border: 3px solid rgba(52, 152, 219, 0.7);
    text-align: center;
    width: 100%;
    max-width: 380px;
    backdrop-filter: blur(10px);
}

.result-title {
    font-family: 'Caveat', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    color: #16a085 !important;
    margin-bottom: 20px;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(22, 160, 133, 0.4);
    text-align: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    min-height: 60px;
}

.result-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #138d75 !important;
    margin-bottom: 30px;
    text-align: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    min-height: 80px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .relax-icon {
        font-size: 3.5rem;
    }
    
    .test-content {
        padding: 15px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .relax-icon {
        font-size: 3rem;
    }
    
    .test-content {
        padding: 12px;
    }
    
    .question-text {
        font-size: 1rem;
    }
}

