/* ======================================
   Arai Connect — Modern Design System
   ====================================== */

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    --accent-purple: #8B5CF6;
    --accent-blue: #3B82F6;
    --accent-pink: #EC4899;
    --instagram-gradient: linear-gradient(135deg, #833AB4, #FD1D1D, #F77737);
    --messenger-gradient: linear-gradient(135deg, #0084FF, #44BEC7);
    --whatsapp-gradient: linear-gradient(135deg, #25D366, #128C7E);
    --tiktok-gradient: linear-gradient(135deg, #000000, #25F4EE, #FE2C55);
    --success-color: #10B981;
    --error-color: #EF4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.15);
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ar);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- Animated Background ---- */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.15);
    top: 10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(59, 130, 246, 0.12);
    bottom: 20%;
    left: -5%;
    animation-delay: -7s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(236, 72, 153, 0.1);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

/* ---- Container ---- */
.container {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Header ---- */
.header {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text h1 {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-subtitle {
    font-family: var(--font-en);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ---- Welcome ---- */
.welcome {
    text-align: center;
    margin-bottom: 36px;
    animation: fadeInDown 0.6s ease-out 0.1s both;
}

.welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.welcome p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

/* ---- Platform Cards ---- */
.platforms {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.platform-card {
    position: relative;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: fadeInUp 0.5s ease-out both;
}

.platform-card.active:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.platform-card.active:hover .card-glow {
    opacity: 1;
}

.platform-card.active:hover .arrow-icon {
    transform: translateX(-4px);
}

.platform-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-glow { background: var(--instagram-gradient); }
.messenger-glow { background: var(--messenger-gradient); }
.whatsapp-glow { background: var(--whatsapp-gradient); }
.tiktok-glow { background: linear-gradient(90deg, #25F4EE, #FE2C55); }

.card-content {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    gap: 16px;
}

.platform-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.platform-card.active:hover .platform-icon {
    transform: scale(1.05);
}

.instagram-icon {
    background: var(--instagram-gradient);
    color: white;
}

.messenger-icon {
    background: var(--messenger-gradient);
    color: white;
}

.whatsapp-icon {
    background: var(--whatsapp-gradient);
    color: white;
}

.tiktok-icon {
    background: linear-gradient(135deg, #25F4EE, #FE2C55);
    color: white;
}

.platform-info {
    flex: 1;
}

.platform-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.platform-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.platform-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.active-badge {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.coming-badge {
    background: rgba(136, 136, 160, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(136, 136, 160, 0.15);
}

.arrow-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.platform-card.active:hover .arrow-icon {
    color: var(--text-secondary);
}

/* ---- Footer ---- */
.footer {
    text-align: center;
    padding-top: 40px;
    margin-top: auto;
    animation: fadeInUp 0.5s ease-out 0.5s both;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-en);
}

.footer-sub {
    margin-top: 4px;
    font-family: var(--font-ar);
    font-size: 0.75rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.footer-sub::before {
    content: '🔒';
    font-size: 0.7rem;
}

/* ---- Result Page Styles ---- */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.result-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.result-icon.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.result-icon svg {
    width: 48px;
    height: 48px;
}

.result-icon.success svg {
    color: var(--success-color);
}

.result-icon.error svg {
    color: var(--error-color);
}

/* Success animation */
.result-icon.success::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.3);
    animation: successPulse 2s ease-out infinite;
}

@keyframes successPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.result-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-title.success-text {
    color: var(--success-color);
}

.result-title.error-text {
    color: var(--error-color);
}

.result-message {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 350px;
    margin-bottom: 32px;
}

.result-details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 400px;
}

.result-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.result-details .detail-row + .detail-row {
    border-top: 1px solid var(--border-color);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-en);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-ar);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ---- Animations ---- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
    }

    .logo-text h1 {
        font-size: 1.7rem;
    }

    .welcome h2 {
        font-size: 1.3rem;
    }

    .card-content {
        padding: 14px 16px;
        gap: 12px;
    }

    .platform-icon {
        width: 46px;
        height: 46px;
    }

    .platform-info h3 {
        font-size: 0.95rem;
    }
}
