:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --accent-color: #43D9AD;
    --dark-bg: #0F172A;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #FFFFFF;
    --text-muted: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-color);
    top: 40%;
    left: 40%;
    animation-duration: 25s;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    text-align: center;
    z-index: 10;
}

/* Typography */
.main-header {
    margin-bottom: 60px;
}

.main-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a5b4fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.main-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Role Selection Cards */
.role-selection {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.role-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 40px 30px;
    width: 300px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.role-card .icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.role-card:nth-child(2) .icon-box {
    color: var(--accent-color);
}

.role-card:nth-child(3) .icon-box {
    color: var(--secondary-color);
}

.role-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.role-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Hover Effects */
.role-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.role-card:hover .icon-box {
    transform: scale(1.2) rotate(5deg);
}

.role-card .shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: 0.5s;
}

.role-card:hover .shine {
    left: 100%;
}

/* Animations */
.fade-in-down {
    animation: fadeInDown 1s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.delay-1 {
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
    opacity: 0;
}

.delay-2 {
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
    opacity: 0;
}

.delay-3 {
    animation: fadeInUp 0.8s ease-out 0.9s forwards;
    opacity: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Buttons */
.step-btn {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.step-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.step-btn.active {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.step-btn.active:hover {
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
    transform: translateY(-3px);
}

/* Admin Link */
.admin-link-container {
    margin-top: 50px;
}

.admin-link {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: var(--text-color);
}

/* Admin Styles */
.admin-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    min-height: 80vh;
}

.sidebar {
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 15px;
}

.sidebar a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: 0.3s;
    display: block;
    padding: 10px;
    border-radius: 10px;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.stat-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

/* Parent Profile Styles */
.profile-card {
    padding: 40px;
    border-radius: 30px;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Inputs */
.glass-input {
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.3);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2.2rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .role-selection {
        flex-direction: column;
        align-items: center;
    }

    .role-card {
        width: 100%;
        max-width: 100%;
        /* Full width on mobile */
    }

    /* Admin Grid Responsive */
    .admin-grid {
        grid-template-columns: 1fr;
        /* Stack sidebar and content */
        gap: 20px;
    }

    .sidebar {
        margin-bottom: 20px;
    }

    /* Stats Grid Responsive */
    .stat-box {
        margin-bottom: 10px;
    }

    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        /* Stack stats vertically */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .main-header h1 {
        font-size: 1.8rem;
    }

    .role-card {
        padding: 25px 20px;
    }

    .role-card h2 {
        font-size: 1.5rem;
    }

    /* Adjust Module Map for small screens */
    .module-node {
        margin-left: 0 !important;
        transform: none !important;
        justify-content: center !important;
        width: 100%;
    }

    .module-card {
        width: 100%;
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px;
    }

    .module-icon {
        margin-bottom: 10px;
    }

    /* Topics Grid Responsive */
    .topics-grid {
        grid-template-columns: 1fr;
    }

    /* Profile Header Responsive */
    .profile-card {
        padding: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Topics Grid Default */
.topics-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.topic-card {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}