/* ================================================
   METATERAPI - Sınav Kaygısı VR Deneyimi
   Terapötik ve sakinleştirici tasarım
   ================================================ */

:root {
    /* Sakinleştirici renk paleti */
    --calm-blue: #4a90a4;
    --soft-teal: #5fb3b3;
    --warm-lavender: #9b8bb4;
    --gentle-peach: #e8c4a2;
    --soft-white: #f5f5f5;
    --deep-night: #1a1f36;
    --text-primary: #2d3748;
    --text-secondary: #718096;

    /* Gradient */
    --gradient-calm: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-peaceful: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--deep-night);
    color: var(--soft-white);
    cursor: default;
}

/* VR modu aktifken scroll'u engelle */
body.vr-active {
    overflow: hidden;
}

/* ================================================
   YÜKLEME EKRANI
   ================================================ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1f36 0%, #2d3561 50%, #1a1f36 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

/* Nefes animasyonlu loader */
.breath-loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.breath-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-peaceful);
    transform: translate(-50%, -50%);
    animation: breathe 4s ease-in-out infinite;
}

.breath-circle:nth-child(2) {
    animation-delay: -1.3s;
    opacity: 0.6;
}

.breath-circle:nth-child(3) {
    animation-delay: -2.6s;
    opacity: 0.3;
}

@keyframes breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.3; }
}

#loading-screen h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-peaceful);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

#loading-screen .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--gradient-peaceful);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ================================================
   GİRİŞ EKRANI
   ================================================ */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 31, 54, 0.95) 0%, rgba(45, 53, 97, 0.9) 100%);
}

.intro-content {
    position: relative;
    text-align: center;
    max-width: 600px;
    padding: 3rem;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.intro-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-peaceful);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(79, 172, 254, 0); }
}

.intro-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.intro-subtitle {
    font-size: 1.2rem;
    color: var(--soft-teal);
    margin-bottom: 2rem;
}

.intro-description {
    margin-bottom: 2.5rem;
}

.intro-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.intro-note {
    font-size: 0.95rem !important;
    color: var(--warm-lavender) !important;
    font-style: italic;
}

/* Kaygı Seviyesi Seçici */
.anxiety-level-selector {
    margin-bottom: 2.5rem;
}

.selector-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.level-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.level-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.level-btn.selected {
    background: rgba(79, 172, 254, 0.2);
    border-color: var(--calm-blue);
}

.level-icon {
    font-size: 2rem;
}

.level-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Başla Butonu */
.intro-buttons {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--gradient-peaceful);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.start-btn:not(:disabled) {
    opacity: 1;
}

.start-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
}

/* VR Butonu */
.vr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.vr-btn i {
    font-size: 1.25rem;
}

.vr-btn:disabled {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    cursor: not-allowed;
    opacity: 0.7;
}

.vr-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.vr-btn.vr-supported {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.vr-btn.vr-supported:hover {
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.4);
}

.vr-status-text {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.intro-controls {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}

.controls-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.controls-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.intro-controls span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls-group span:not(.controls-title) {
    font-size: 0.8rem;
}

/* ================================================
   3D CANVAS
   ================================================ */
#therapy-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ================================================
   PSİKOLOG DİYALOG PANELİ
   ================================================ */
#dialog-panel {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    max-width: 700px;
    width: 90%;
    z-index: 100;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(30px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dialog-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    background: var(--gradient-calm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.avatar-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--calm-blue);
    transform: translate(-50%, -50%);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

/* Konuşma animasyonu */
.avatar-pulse.speaking {
    animation: speakingPulse 0.5s ease-in-out infinite;
    border-color: var(--soft-teal);
}

@keyframes speakingPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
}

.dialog-content {
    flex: 1;
    background: rgba(26, 31, 54, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-name {
    font-size: 0.85rem;
    color: var(--soft-teal);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dialog-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

/* Diyalog Seçenekleri */
.dialog-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: rgba(79, 172, 254, 0.2);
    border-color: var(--calm-blue);
    transform: translateY(-2px);
}

.choice-btn .choice-icon {
    font-size: 1.2rem;
}

/* Devam Butonu */
.dialog-continue {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background: var(--gradient-peaceful);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.dialog-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.3);
}

/* ================================================
   NEFES EGZERSİZİ
   ================================================ */
#breath-exercise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 31, 54, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.breath-container {
    text-align: center;
}

.breath-visual {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
}

.breath-main-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: var(--gradient-peaceful);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 4s ease-in-out;
}

.breath-main-circle.inhale {
    transform: translate(-50%, -50%) scale(1.4);
}

.breath-main-circle.hold {
    transform: translate(-50%, -50%) scale(1.4);
}

.breath-main-circle.exhale {
    transform: translate(-50%, -50%) scale(1);
}

.breath-instruction {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.breath-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(79, 172, 254, 0.3);
    transform: translate(-50%, -50%);
}

.ring-1 { width: 180px; height: 180px; }
.ring-2 { width: 210px; height: 210px; }
.ring-3 { width: 240px; height: 240px; }

.breath-timer {
    font-size: 3rem;
    font-weight: 700;
    color: var(--soft-teal);
    margin-bottom: 1rem;
}

.breath-info {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
}

.breath-skip {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.breath-skip:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

/* ================================================
   İLERLEME GÖSTERGESİ
   ================================================ */
#progress-indicator {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(26, 31, 54, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step.completed .step-dot {
    background: var(--gradient-success);
}

.step-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.step.active .step-dot {
    background: var(--gradient-peaceful);
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.step span {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.step-line {
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.5rem;
}

/* ================================================
   GÜVENLİ ÇIKIŞ BUTONU
   ================================================ */
#safe-exit {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(26, 31, 54, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

#safe-exit:hover {
    background: rgba(79, 172, 254, 0.2);
    border-color: var(--calm-blue);
}

#safe-exit i {
    color: var(--soft-teal);
}

/* ================================================
   KONTROL İPUÇLARI
   ================================================ */
#controls-hint {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.key {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ================================================
   CROSSHAIR
   ================================================ */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 50;
}

.crosshair-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.crosshair-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

#crosshair.interactive .crosshair-ring {
    width: 30px;
    height: 30px;
    border-color: var(--soft-teal);
}

/* ================================================
   MESAJ BİLDİRİMİ
   ================================================ */
#message-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(26, 31, 54, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    z-index: 150;
    animation: notificationIn 0.5s ease;
}

@keyframes notificationIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#message-notification i {
    color: var(--soft-teal);
}

/* ================================================
   BAŞARI EKRANI
   ================================================ */
#success-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.95) 0%, rgba(56, 239, 125, 0.9) 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 500;
    overflow-y: auto;
    padding: 2rem 0;
}

.success-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
    margin: auto 0;
    animation: fadeInUp 0.8s ease;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.success-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.success-message {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.success-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.success-reflection {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.reflection-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.success-reflection ul {
    list-style: none;
}

.success-reflection li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.success-reflection li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
}

.success-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-replay, .btn-exit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-replay {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-exit {
    background: white;
    border: none;
    color: #11998e;
}

.btn-replay:hover, .btn-exit:hover {
    transform: translateY(-2px);
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .intro-title {
        font-size: 2.5rem;
    }

    .level-options {
        flex-direction: column;
    }

    .level-btn {
        flex-direction: row;
        justify-content: center;
    }

    #dialog-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .dialog-avatar {
        align-self: flex-start;
    }

    .progress-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .step-line {
        display: none;
    }

    .intro-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}
