/* --- CSS Reset & Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-font: 'Poppins', sans-serif;
    --serif-font: 'Cinzel', serif;
    --tamil-font: 'Noto Sans Tamil', sans-serif;
    --glass-bg: rgba(25, 25, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-color: #ffffff;
    --accent-gold: #fbd971;
}

body {
    font-family: var(--primary-font);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #1a2a6c);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    padding: 2rem 1rem;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Layout & Animations --- */
.wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.fade-in {
    animation: fadeIn 1.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header Section (Desktop Default) --- */
.header-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    text-align: left;
    background: linear-gradient(90deg, rgba(0,0,0,0.2) 0%, transparent 100%);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 4px solid var(--accent-gold);
}

.logo {
    width: 130px;
    height: auto;
    filter: drop-shadow(0px 0px 15px rgba(255, 255, 255, 0.6));
    flex-shrink: 0;
}

.uni-details {
    line-height: 1.6;
}

.tamil-text {
    font-family: var(--tamil-font);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.english-title {
    font-family: var(--serif-font);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0 0.2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.sub-title {
    font-size: 0.95rem;
    font-weight: 300;
    color: #e0e0e0;
}

/* --- Event Title --- */
.title-section {
    text-align: center;
    margin: 0.5rem 0;
}

.glowing-title {
    font-family: var(--serif-font);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(to right, #fbd971, #ff9a44, #fbd971);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(251, 217, 113, 0.4);
}

/* --- Event Meta (Date, Time, Place) --- */
.event-meta-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    width: fit-content;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
}

.meta-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #cccccc;
    letter-spacing: 1px;
}

.meta-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.divider {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* --- Countdown Timer --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.time-box {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    width: 100px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(251, 217, 113, 0.2);
    border-color: rgba(251, 217, 113, 0.4);
}

.time-box span:first-child {
    display: block;
    font-size: 2.2rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.time-box .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cccccc;
    margin-top: 5px;
    display: block;
}

/* --- Glass Cards --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-card h3 {
    font-family: var(--serif-font);
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.invitation-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.highlight-text {
    color: #ff9a44;
    font-weight: 600;
}

.instruction-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.instruction-list li {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.instruction-list li span {
    color: #00e676;
    font-weight: bold;
}

.announcement {
    background: rgba(251, 217, 113, 0.15);
    border-left: 4px solid var(--accent-gold);
    padding: 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 1.05rem;
}

/* --- Apply Button --- */
.footer-section {
    text-align: center;
    margin-top: 1rem;
    padding-bottom: 2rem;
}

.apply-btn {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(90deg, #ff9a44, #fc6076);
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 15px rgba(252, 96, 118, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.apply-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 25px rgba(252, 96, 118, 0.6), 0 0 40px rgba(255, 154, 68, 0.4);
}

/* --- Floating Particles --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* =========================================
   STYLISH MOBILE RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    /* Header adjustments */
    .header-section {
        flex-direction: column;
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--accent-gold);
        background: rgba(0, 0, 0, 0.15);
    }
    
    .logo {
        width: 100px; /* Scaled down perfectly for mobile */
        margin-bottom: 0.5rem;
    }

    /* Typography scaling */
    .english-title { font-size: 1.3rem; }
    .tamil-text { font-size: 0.95rem; }
    .sub-title { font-size: 0.85rem; }
    .glowing-title { font-size: 2.2rem; letter-spacing: 1px; }

    /* Meta Info Card (Date, Time, Place) - Vertical Stack */
    .meta-container {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 16px;
        width: 100%;
        padding: 1.5rem;
        gap: 1.2rem;
    }
    
    .meta-item {
        width: 100%;
    }

    .divider {
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.15);
    }

    /* Countdown Timer - 2x2 Grid Layout for premium look */
    .countdown-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .time-box { 
        width: 100%; 
        padding: 1.2rem 0.5rem; 
    }
    .time-box span:first-child { font-size: 2rem; }

    /* Glass Cards scaling */
    .glass-card { padding: 1.5rem; }
    .glass-card h3 { font-size: 1.3rem; }
    
    /* Apply Button - Full width for easy tapping */
    .apply-btn { 
        padding: 1rem 1.5rem; 
        font-size: 1.1rem; 
        width: 100%;
        display: block;
    }
}