:root {
    --baham-pink: #ff3380;
    --valentine-red: #ff0033;
    --dark-bg: #121226;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-white: #ffffff;
    --text-gray: #cccccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
}

/* فریم موبایل */
.mobile-container {
    width: 390px;
    height: 844px;
    background-color: var(--dark-bg);
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    border: 8px solid #222;
    box-shadow: 0 0 50px rgba(255, 51, 128, 0.2);
    display: flex;
    flex-direction: column;
}

/* خطوط نئونی پس‌زمینه */
.neon-line {
    position: absolute;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--baham-pink), transparent);
    filter: blur(5px);
    transform: rotate(-45deg);
    z-index: 1;
}
.line-1 { top: 10%; left: -50%; opacity: 0.6; }
.line-2 { bottom: 20%; left: -50%; opacity: 0.4; }

/* Screen management */
.screen {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* ============ START SCREEN STYLES ============ */
.start-header-section {
    height: 45%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.character-img {
    width: 90%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 51, 128, 0.4));
}

.start-content-section {
    padding: 20px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.headline-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--baham-pink);
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 51, 128, 0.3);
}

.headline-card h1 {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(to left, #fff, #ffb3d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px 10px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--baham-pink);
}

.icon-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
}

.icon-box img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}

.feature-card h3 { 
    font-size: 14px; 
    margin-bottom: 5px; 
}

.start-footer-section {
    margin-top: auto;
    padding: 30px 20px 40px;
    display: flex;
    justify-content: center;
}

.start-btn {
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(45deg, var(--baham-pink), var(--valentine-red));
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 0, 51, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.start-btn:active { 
    transform: scale(0.98); 
}

.arrow-icon {
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ============ QUESTIONS SCREEN STYLES ============ */
.quiz-container {
    display: flex;
    flex-direction: column;
    padding: 30px 24px;
    height: 100%;
    z-index: 2;
}

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

.quiz-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffffff;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 0 10px var(--baham-pink);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--baham-pink), var(--valentine-red));
    width: 0%;
    border-radius: 10px;
    box-shadow: 0 0 15px var(--baham-pink);
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--baham-pink);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 51, 128, 0.5);
}

.question-card {
    background-color: #e6e6e6;
    color: #222222;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.option-btn {
    background: var(--glass-bg);
    border: 2px solid rgba(255, 51, 128, 0.3);
    border-radius: 50px;
    padding: 18px 24px;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-align: right;
    position: relative;
    overflow: hidden;
}

.option-btn:hover, .option-btn.selected {
    background: rgba(255, 51, 128, 0.1);
    border-color: var(--baham-pink);
    box-shadow: 0 0 15px rgba(255, 51, 128, 0.4), inset 0 0 10px rgba(255, 51, 128, 0.2);
}

.option-btn.selected::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--baham-pink), transparent 70%);
    opacity: 0.1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.1; }
}

.next-btn-container {
    margin-top: auto;
    padding-top: 20px;
}

.next-btn {
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(45deg, var(--baham-pink), var(--valentine-red));
    color: white;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(255, 0, 51, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

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

.next-btn:not(:disabled):hover {
    box-shadow: 0 12px 25px rgba(255, 0, 51, 0.5);
}

.next-btn:not(:disabled):active {
    transform: scale(0.98);
    box-shadow: 0 5px 15px rgba(255, 0, 51, 0.3);
}

/* ============ RESULT SCREEN STYLES ============ */
.result-container {
    padding: 40px 30px;
    text-align: center;
    color: var(--text-white);
    overflow-y: auto;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.15) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
    z-index: 0;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

.header-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
}

.character-section {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.neon-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--baham-pink);
    box-shadow: 
        0 0 20px var(--baham-pink),
        0 0 40px var(--baham-pink),
        inset 0 0 20px var(--baham-pink);
}

.character-image {
    width: 90%;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.persona-badge {
    background-color: rgba(50, 10, 30, 0.8);
    border: 2px solid var(--baham-pink);
    padding: 10px 30px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.3);
}

.persona-badge h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 0 0 10px var(--baham-pink);
    margin: 0;
}

.description-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-gray);
    margin-bottom: 40px;
    padding: 0 10px;
}

.actions-section {
    margin-top: auto;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    color: var(--text-white);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-icon {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    fill: currentColor;
}

.btn-primary {
    background: linear-gradient(45deg, var(--baham-pink), var(--valentine-red));
    box-shadow: 0 5px 20px rgba(255, 0, 127, 0.4);
    margin-bottom: 15px;
}

.btn-primary:hover {
     box-shadow: 0 8px 25px rgba(255, 0, 127, 0.6);
}

.secondary-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--baham-pink);
    box-shadow: inset 0 0 10px rgba(255, 0, 127, 0.2);
    font-size: 14px;
    padding: 14px;
}

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

/* Loading state */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

