/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
   :root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 15px rgba(99, 102, 241, 0.5);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
    background-attachment: fixed;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.admin-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 2rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

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

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 40%;
    left: 40%;
    animation-duration: 15s;
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.college-info h3 {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.college-info p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.presents {
    font-style: italic;
    color: var(--text-muted) !important;
    margin-bottom: 2rem !important;
}

.main-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: 2rem;
    line-height: 1.1;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
}

.event-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.detail-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.detail-badge i {
    color: var(--primary-light);
    font-size: 1.2rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--neon-glow);
}

.btn-block {
    width: 100%;
}

.btn-glow {
    position: relative;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    z-index: -1;
    border-radius: 14px;
    background-size: 200% auto;
    animation: gradientFlow 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-glow:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Events Section
   ========================================================================== */
.events-section {
    padding: 6rem 0;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.event-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.event-card:hover .card-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.event-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.event-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==========================================================================
   Forms Overview
   ========================================================================== */
.form-container {
    max-width: 800px;
    margin: 8rem auto 4rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
@media (max-width: 768px) {
    .form-container {
        width: 100%;
        padding: 1rem;
        margin: 1rem 0;
    }
}
.form-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control, .form-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

.form-section-title {
    font-size: 1.3rem;
    color: var(--primary-light);
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.declaration-box {
    background: rgba(236, 72, 153, 0.05);
    border: 1px solid rgba(236, 72, 153, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2.5rem 0;
}

.declaration-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary);
}

/* Auth / Admin */
.auth-container {
    max-width: 450px;
    margin: 10vh auto;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Admin Dashboard Table */
.dashboard-container {
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.table-responsive {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Footer */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.small-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 50px) rotate(10deg); }
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .form-container {
        padding: 2rem 1.5rem;
        margin: 6rem 1rem 3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none; /* In a real app, add a hamburger menu */
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Rules Modal Popup
   ========================================================================== */
.rules-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.rules-modal {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.97));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 620px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 40px rgba(99,102,241,0.15);
    animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rules-modal-header {
    text-align: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rules-modal-header .modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(236,72,153,0.2));
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-light);
    margin: 0 auto 1rem;
}

.rules-modal-header h2 {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.rules-modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.55;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.rules-list li:hover {
    background: rgba(99,102,241,0.07);
}

.rules-list li::before {
    content: '✦';
    color: var(--primary-light);
    font-size: 0.7rem;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.rules-list li strong {
    color: var(--primary-light);
}

.rules-modal-footer {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.rules-modal-footer .btn-agree {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.rules-modal-footer .btn-agree:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(236,72,153,0.5);
}

.rules-modal-footer .btn-back {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rules-modal-footer .btn-back:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.rules-modal::-webkit-scrollbar { width: 6px; }
.rules-modal::-webkit-scrollbar-track { background: transparent; }
.rules-modal::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 3px; }

@media (max-width: 480px) {
    .rules-modal { padding: 1.5rem; border-radius: 18px; }
    .rules-modal-header h2 { font-size: 1.3rem; }
}