@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif, Arial, Helvetica;
    background: radial-gradient(circle at top, #4a00e0, #8e2de2);
    background-size: cover;
    background-attachment: fixed;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 100vh; /* تأكد من أن الصفحة تتمدد بشكل كامل */
    direction: rtl;
    overflow-y: auto; /* السماح بالتمرير العمودي */
    animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: floatIn 1.2s ease-in-out;
    width: 90%;
    max-width: 400px;
    margin: 20px 0; /* إضافة مسافة من الأعلى والأسفل */
}

@keyframes floatIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.logo-wrapper {
    margin-bottom: -10px;
    margin-top: 20px;
    animation: floatLogo 3s ease-in-out infinite;
}

.study-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease-in-out;
}

.study-icon:hover {
    transform: scale(1.1) rotate(2deg);
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1.highlight {
    font-size: 2.1em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ffdd00, #ff00cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #ffdd00; }
    to { text-shadow: 0 0 20px #ff00cc; }
}

.subtitle {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #eee;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

#countdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 خانات في السطر على كل الأجهزة */
    gap: 20px;
    justify-items: center;
    flex-wrap: wrap;
}

.time-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    padding: 15px 20px;
    min-width: 70px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease-in-out;
}

.time-box:hover {
    transform: scale(1.1);
}

.time-box span {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
    color: #fff;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

.time-box small {
    font-size: 1.1em;
    margin-top: 8px;
    display: block;
    opacity: 0.9;
    color: #e0e0e0;
}

.telegram-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 25px;
    font-size: 1.2em;
    color: #fff;
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 198, 255, 0.6);
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
    animation: pulse 2s infinite;
}

.telegram-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 198, 255, 0.9);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 198, 255, 0.6); }
    50% { transform: scale(1.07); box-shadow: 0 0 25px rgba(0, 198, 255, 1); }
}

.channel-owner {
    margin-top: 15px;
    font-size: 1.1em;
    font-style: italic;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
    color: #eeeeee;
    animation: fadeIn 2s ease-in-out;
}

.channel-owner span {
    font-weight: bold;
    color: #00ffd5;
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.8);
}

.channel-owner span.maria {
    color: #ff99ff;
    text-shadow: 0 0 10px rgba(255, 153, 255, 0.8);
}

.channel-owner span.astro {
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

.footer-copy {
    margin-top: 10px;
    font-size: 1.1em;
    color: #ffffff;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.6);
    animation: vibrate 0.5s ease-in-out infinite;
}

@keyframes vibrate {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.footer-copy a {
    color: #ff00cc;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-copy a:hover {
    text-decoration: underline;
    color: #00c6ff;
    transform: scale(1.1);
}

/* 📱 Media Query للهواتف */
@media (max-width: 480px) {
    h1.highlight {
        font-size: 1.5em;
        padding: 0 10px;
    }

    .subtitle {
        font-size: 1.2em;
    }

    .time-box span {
        font-size: 2em;
    }

    .time-box small {
        font-size: 0.9em;
    }

    .telegram-btn {
        font-size: 1em;
        padding: 10px 20px;
        width: 100%; /* اجعل الأزرار تأخذ العرض الكامل */
        box-sizing: border-box; /* تأكد من أن الحشو لا يتداخل مع العرض */
    }

    .container {
        width: 95%; /* خفض الحجم لتناسب الشاشات الصغيرة */
        padding: 20px;
    }

    #countdown {
        grid-template-columns: repeat(2, 1fr); /* 2 خانات في السطر على الهواتف */
    }
}
