
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    padding: 15px;
}

.screen {
    display: none;
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.family-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px auto;
    border-radius: 16px;
    overflow: hidden;
    background: #fafafa;
    border: 2px solid #e0e0e0;
}

.family-img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.avatar-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0);
    border: 2px dashed transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    z-index: 10;
    outline: none;
}

.avatar-btn:hover, .avatar-btn.selected {
    background: rgba(255, 215, 0, 0.35);
    border-color: #ff9800;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.6);
    transform: scale(1.02);
}

.avatar-btn.dad { top: 21%; left: 45%; width: 28%; height: 40%; }
.avatar-btn.mom { top: 29%; left: 23%; width: 22%; height: 25%; }
.avatar-btn.boy-left { top: 45%; left: 4%; width: 26%; height: 52%; }
.avatar-btn.girl { top: 49%; left: 35%; width: 27%; height: 48%; }
.avatar-btn.boy-right { top: 46%; left: 67%; width: 27%; height: 50%; }


.form-group {
    margin-bottom: 15px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #34495e;
    font-size: 0.95rem;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: border-color 0.2s ease;
    outline: none;
}

.form-group input:focus, 
.form-group select:focus {
    border-color: #3498db;
    background-color: #ffffff;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: bold;
    color: #7f8c8d;
}

.question-text {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 600;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.option-btn {
    width: 100%;
    padding: 14px 18px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: #334155;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-weight: 500;
}

.option-btn:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

.option-btn.selected {
    background-color: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
    font-weight: bold;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.primary-btn {
    background-color: #2ecc71;
    color: white;
}

.primary-btn:hover {
    background-color: #27ae60;
}

.secondary-btn {
    background-color: #3498db;
    color: white;
}

.secondary-btn:hover {
    background-color: #2980b9;
}