/* CSS Reset & Variables */
:root {
    --bg-color: #0b0f17;
    --card-bg: rgba(17, 24, 39, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --accent-gradient: linear-gradient(135deg, #10b981, #059669);
    --hover-gradient: linear-gradient(135deg, #4f46e5, #7c3aed);
    --danger-color: #ef4444;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-border: rgba(245, 158, 11, 0.2);
    --warning-text: #f59e0b;
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background Glowing Orbs */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: #8b5cf6;
    bottom: -150px;
    right: -150px;
}

/* Main Container */
.app-container {
    width: 100%;
    max-width: 640px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

/* Card Style (Glassmorphism) */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.card.active {
    display: block;
    animation: slideUpFadeIn 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header & Typography */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    color: #8b5cf6;
}

.icon-compass {
    width: 36px;
    height: 36px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* Inputs and Forms */
.input-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-arrow, .icon-refresh, .icon-calendar {
    width: 20px;
    height: 20px;
}

/* Quiz Screen Specifics */
.quiz-header {
    margin-bottom: 30px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    align-self: flex-end;
}

.question-container {
    margin-bottom: 28px;
    text-align: center;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

#question-text {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    color: var(--text-primary);
}

.option-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.option-btn:hover .option-label {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

.option-val {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Coaching Info Box */
.coaching-info-box {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 16px;
    padding: 16px 20px;
}

.coaching-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--warning-text);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.icon-sparkles {
    width: 16px;
    height: 16px;
}

#coaching-tip {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Result Screen Specifics */
.success-ring-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.success-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.icon-check {
    width: 36px;
    height: 36px;
}

.result-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.winner-text {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.score-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.score-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #ffffff;
}

.score-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    transition: width 1s ease-out;
}

#score-bar-fill-a {
    background: #6366f1;
}

#score-bar-fill-b {
    background: #a855f7;
}

/* Awareness Box */
.awareness-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.awareness-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.awareness-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.awareness-box p:last-child {
    margin-bottom: 0;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.cta-message {
    color: #d1d5db !important;
}

.btn-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .btn-group {
        grid-template-columns: 1fr 2fr;
    }
}

/* Footer styling */
.app-footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Animations */
@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-spin-slow {
    animation: spin 16s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.03);
    }
}

/* Modal Popup Overlay & Card Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

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

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 12px;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.kvkk-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.kvkk-checkbox {
    accent-color: #c8a951;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.kvkk-link {
    color: #c8a951;
    text-decoration: underline;
}
