/* صفحة اختبر نسبة الحب - ألوان هادئة وتصميم أنيق */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.love-test-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(160deg, #fce4ec 0%, #f3e5f5 40%, #e8eaf6 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}

/* هيدر الصفحة: اسم الموقع + روبوت ترحيبي */
.love-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}
.love-site-name {
    font-size: 28px;
    font-weight: 800;
    color: #880e4f;
    letter-spacing: -0.5px;
}
.love-robot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.robot-icon {
    width: 48px;
    height: 48px;
    display: block;
    animation: robot-wave 5s ease-in-out infinite;
}
/* حركة ترحيب للروبوت تتكرر كل 5 ثوانٍ */
@keyframes robot-wave {
    0%, 100% { transform: rotate(0deg) scale(1); }
    2%       { transform: rotate(-18deg) scale(1.08); }
    4%       { transform: rotate(12deg) scale(1.06); }
    6%       { transform: rotate(-6deg) scale(1.03); }
    8%       { transform: rotate(0deg) scale(1); }
}

.love-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.love-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 12px 48px rgba(233, 30, 99, 0.12), 0 4px 16px rgba(156, 39, 176, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.love-title {
    font-size: 26px;
    color: #880e4f;
    font-weight: 700;
    margin-bottom: 28px;
    line-height: 1.4;
}

/* منطقة رفع الصور */
.upload-section {
    transition: opacity 0.35s ease;
}

.upload-section.hidden {
    display: none;
}

.upload-boxes {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.upload-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    border: 2px dashed #e91e63;
    border-radius: 16px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: #c2185b;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.15);
}

.upload-box .upload-icon {
    font-size: 36px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.upload-box .upload-text {
    font-size: 16px;
    color: #ad1457;
    font-weight: 600;
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: none;
}

.upload-preview.has-image {
    display: block;
}

.upload-box .upload-icon,
.upload-box .upload-text {
    transition: opacity 0.2s ease;
}

.upload-box:has(.upload-preview.has-image) .upload-icon,
.upload-box:has(.upload-preview.has-image) .upload-text {
    opacity: 0;
    pointer-events: none;
}

/* اختيار البرج */
.zodiac-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.zodiac-label {
    font-size: 14px;
    color: #ad1457;
    font-weight: 600;
}
.zodiac-picker {
    position: relative;
    width: 100%;
    max-width: 280px;
}
.zodiac-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #831843;
    background: #fff;
    border: 2px solid #f9a8d4;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
}
.zodiac-btn:hover {
    border-color: #e91e63;
    background: #fdf2f8;
}
/* القائمة المنسدلة: مخفية تماماً حتى النقر على الزر — الأبراج تظهر فقط داخلها */
.zodiac-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 6px;
    background: #fff;
    border: 2px solid #fbcfe8;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.2);
    max-height: 280px;
    overflow-y: auto;
    z-index: 10;
}
.zodiac-dropdown.open {
    display: block;
}
.zodiac-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #4a148c;
    background: none;
    border: none;
    border-bottom: 1px solid #fce7f3;
    cursor: pointer;
    text-align: right;
    transition: background 0.2s ease;
}
.zodiac-option:last-child {
    border-bottom: none;
}
.zodiac-option:hover {
    background: #fdf2f8;
}

/* زر احسب النتيجة */
.btn-calc {
    width: 100%;
    padding: 16px 24px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.35);
}

.btn-calc:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(233, 30, 99, 0.45);
}

.btn-calc:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* منطقة النتيجة */
.result-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.result-section:not(.hidden) {
    display: block;
}

.result-section.show-result {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hearts-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.hearts-bg .heart {
    position: absolute;
    font-size: 28px;
    opacity: 0.15;
    animation: floatHeart 4s ease-in-out infinite;
}

.hearts-bg .heart:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.hearts-bg .heart:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.8s; }
.hearts-bg .heart:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 1.6s; }
.hearts-bg .heart:nth-child(4) { bottom: 15%; right: 10%; animation-delay: 2.4s; }
.hearts-bg .heart:nth-child(5) { top: 50%; left: 5%; animation-delay: 3.2s; }

@keyframes floatHeart {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.15; }
    50% { transform: translateY(-8px) scale(1.1); opacity: 0.25; }
}

.result-box {
    background: linear-gradient(145deg, #fdf2f8 0%, #fce4ec 100%);
    border: 2px solid rgba(233, 30, 99, 0.2);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 22px;
    position: relative;
    box-shadow: inset 0 2px 12px rgba(255, 255, 255, 0.8);
}

.result-label {
    font-size: 18px;
    color: #880e4f;
    font-weight: 600;
    margin-bottom: 8px;
}

.result-percent {
    font-size: 52px;
    font-weight: 800;
    background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    line-height: 1.2;
}

.result-percent.animate-in {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.result-message {
    font-size: 17px;
    color: #4a148c;
    line-height: 1.6;
    font-weight: 500;
}

.btn-try {
    width: 100%;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 600;
    color: #ad1457;
    background: #fff;
    border: 2px solid #e91e63;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-try:hover {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.2);
}

.result-download-label {
    font-size: 16px;
    color: #831843;
    font-weight: 600;
    margin: 20px 0 12px 0;
}
.result-download-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.result-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.result-download-btn:hover {
    transform: translateY(-2px);
}
.result-googleplay {
    background: linear-gradient(135deg, #3ddc84 0%, #0f9d58 100%);
    box-shadow: 0 4px 14px rgba(15, 157, 88, 0.35);
}
.result-googleplay:hover {
    box-shadow: 0 6px 20px rgba(15, 157, 88, 0.45);
}
.result-appstore {
    background: linear-gradient(135deg, #555 0%, #000 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.result-appstore:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-home {
    display: inline-block;
    margin-top: 20px;
    font-size: 15px;
    color: #7b1fa2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-home:hover {
    color: #4a148c;
    text-decoration: underline;
}

/* متجاوب للموبايل */
@media (max-width: 600px) {
    .love-card {
        padding: 24px 20px;
    }

    .love-title {
        font-size: 22px;
        margin-bottom: 22px;
    }

    .upload-box {
        min-height: 120px;
    }

    .upload-box .upload-text {
        font-size: 15px;
    }

    .btn-calc {
        font-size: 18px;
        padding: 14px 20px;
    }

    .result-percent {
        font-size: 44px;
    }

    .result-message {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .love-test-page {
        padding: 12px;
    }

    .love-title {
        font-size: 20px;
    }

    .result-percent {
        font-size: 38px;
    }
}
