:root {
    --primary: #0f1419;
    --primary-light: #1a2332;
    --primary-dark: #070a0f;
    --accent: #FF1744;
    --accent-light: #FF4569;
    --purple-glow: #7c3aed;
    --blue-glow: #3b82f6;
    --warm-white: #FFFFFF;
    --cream: #F8F9FA;
    --card-bg: rgba(26, 35, 50, 0.4);
    --card-hover: rgba(26, 35, 50, 0.6);
    --text-dark: #FFFFFF;
    --text-medium: #c5d4f9;
    --text-light: #8ba3d4;
    --border: rgba(59, 130, 246, 0.2);
    --success: #10b981;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #070a0f 0%, #0f1419 20%, #1a2332 40%, #1e2738 50%, #1a2332 60%, #0f1419 80%, #070a0f 100%);
    background-size: 400% 400%;
    animation: cosmicShift 20s ease infinite;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Starfield background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
            radial-gradient(2px 2px at 20% 30%, white, transparent),
            radial-gradient(2px 2px at 60% 70%, white, transparent),
            radial-gradient(1px 1px at 50% 50%, white, transparent),
            radial-gradient(1px 1px at 80% 10%, white, transparent),
            radial-gradient(2px 2px at 90% 60%, white, transparent),
            radial-gradient(1px 1px at 33% 80%, white, transparent),
            radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: stars 200s linear infinite;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* Purple glow */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

@keyframes cosmicShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes stars {
    from { background-position: 0 0; }
    to { background-position: -200% -200%; }
}

/* Header */
.header {
    background: rgba(7, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(15, 20, 25, 0.6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow:
            0 0 20px rgba(59, 130, 246, 0.4),
            0 0 10px rgba(124, 58, 237, 0.2),
            0 4px 12px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.logo-text {
    font-family: 'Crimson Pro', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--warm-white);
}

.logo-text span {
    font-size: 0.75rem;
    vertical-align: super;
}

.header-title {
    font-size: 1rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Glassmorphic Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow:
            0 8px 32px 0 rgba(0, 0, 0, 0.37),
            inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(59, 130, 246, 0.08),
            transparent
    );
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    box-shadow:
            0 12px 40px 0 rgba(59, 130, 246, 0.25),
            0 0 20px rgba(124, 58, 237, 0.1),
            inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    background: var(--card-hover);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Teacher Info Card */
.teacher-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--success);
    animation-delay: 0.1s;
}

.teacher-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.teacher-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--warm-white);
}

.teacher-details {
    color: var(--text-medium);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Assignment Info Bar */
.assignment-bar {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation-delay: 0.2s;
}

.assignment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #fde047;
    font-size: 0.9rem;
}

/* Activity Card */
.activity-card {
    padding: 0;
    margin-bottom: 1.5rem;
    animation-delay: 0.3s;
}

.activity-content {
    padding: 2rem;
}

.activity-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--warm-white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.activity-description {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.activity-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-glow);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Start Button */
.start-button {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
            0 4px 12px rgba(255, 23, 68, 0.3),
            0 0 20px rgba(255, 23, 68, 0.2);
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: inherit;
}

.start-button:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow:
            0 6px 20px rgba(255, 23, 68, 0.4),
            0 0 30px rgba(255, 23, 68, 0.3);
}

.start-button:active {
    transform: translateY(0);
}

/* Teacher Message */
.teacher-message {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation-delay: 0.4s;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #fde047;
    font-weight: 700;
    font-size: 0.9rem;
}

.message-content {
    color: var(--text-medium);
    line-height: 1.6;
    font-size: 0.95rem;
    font-style: italic;
}

/* Footer */
.footer {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid var(--glass-border);
    animation-delay: 0.5s;
}

.footer-text {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--blue-glow);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.footer-link:hover {
    color: var(--accent-light);
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/*Iframe Css*/
/* ===============================
   MODAL OVERLAY
================================ */

#activityIframeModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
}

/* ===============================
   MODAL BOX (TRUE CENTER METHOD)
================================ */

#activityIframeModal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 94vw;
    height: 94vh;
    /*max-width: 1600px;*/
    background: #ffffff;
    border-radius: 18px;
    border: 8px solid #ffffff;
    box-shadow: 0 40px 120px rgba(0,0,0,0.6);
    overflow: hidden;
}

/* ===============================
   IFRAME
================================ */

#activityIframeModal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===============================
   CLOSE BUTTON
================================ */

#activityIframeModal .iframe-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

#activityIframeModal .iframe-header button {
    width: 52px;
    height: 52px;
    border-radius: 50%;

    background: #dc2626;
    color: #ffffff;

    border: none;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* end of Iframe Css */

/* Mobile Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .logo-section {
        justify-content: center;
    }

    .header-title {
        text-align: center;
    }

    .assignment-bar {
        gap: 1rem;
        padding: 0.875rem;
    }

    .assignment-item {
        font-size: 0.8rem;
    }

    .activity-content {
        padding: 1.5rem;
    }

    .activity-title {
        font-size: 1.5rem;
    }

    .teacher-details {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}