@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+Tamil:wght@400;500;600;700;800&display=swap');

:root {
    /* Premium Mobile App Color Palette */
    --primary: #4f46e5; /* Deep Indigo / Purple */
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #ec4899; /* Vibrant Pink */
    --accent: #f59e0b; /* Golden Amber */
    --danger: #ef4444;
    --bg-main: #f8fafc; /* Premium soft backdrop */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    background-color: #0f172a;
    background-image: radial-gradient(circle at top right, #1e1b4b, #0f172a);
}

body {
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* Mobile App Wrapper Styles */
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--bg-main);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    min-height: 100vh;
    position: relative;
}

@media (min-width: 481px) {
    html {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }
    body {
        min-height: 90vh;
        height: 90vh;
        border-radius: 36px;
        border: 12px solid #1e293b;
        overflow-y: auto;
    }
    /* Hide scrollbar for native app feel */
    body::-webkit-scrollbar { display: none; }
    body { -ms-overflow-style: none; scrollbar-width: none; }
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* Reusable Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.card {
    background: var(--bg-card);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5); /* Glass edge */
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

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

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    position: relative;
    z-index: 1000;
    padding: 1.25rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 10px 20px -5px rgba(0,0,0,0.02);
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
}
.logo span {
    color: var(--primary);
}

/* Footer style */
footer {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    color: var(--text-muted);
}

/* Responsive Grid */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Syllabus Index Styles */
.term-section {
    margin-bottom: 3rem;
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.term-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.unit-group {
    margin-bottom: 2rem;
}

.unit-group:last-child {
    margin-bottom: 0;
}

.unit-title {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.topics-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.topic-card {
    background: var(--bg-main);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-updated {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fee2e2;
    color: #991b1b;
}

.disabled-card {
    opacity: 0.7;
    background: #f1f5f9;
}

.btn-disabled {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(100%);
}
@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Lesson notes shared styles */
.content-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.75rem;
}

.main-title-card {
    text-align: center;
    background: var(--bg-card);
    padding: 1.5rem 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
    border: 3px solid transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)), radial-gradient(circle at top left, var(--primary-light), var(--accent), var(--primary));
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.main-title-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.5;
}

/* premium lesson notes enhacements */
.section-title {
    color: #dc2626; /* Premium Red */
    border-left: 6px solid var(--accent);
    padding: 0.6rem 1.2rem;
    margin-bottom: 1.75rem;
    font-weight: 800;
    font-size: 1.6rem;
    background: linear-gradient(to right, var(--primary-light), transparent);
    border-radius: 0 0.5rem 0.5rem 0;
}

.keyword {
    color: #e91e63; /* Premium Vibrant Pink */
    font-weight: 800;
    padding: 0 2px;
}

.sub-heading {
    color: #2563eb; /* Premium Blue */
    font-weight: 800;
    font-size: 1.35rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    display: block;
    border-bottom: 3px solid #dbeafe;
    width: fit-content;
    padding-right: 2rem;
}

.box-premium {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.box-premium:hover {
    transform: translateX(4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.box-green { 
    border-top: 6px solid #10b981; 
    background: linear-gradient(to bottom right, #f0fdf4, #ffffff); 
}
.box-blue { 
    border-top: 6px solid #3b82f6; 
    background: linear-gradient(to bottom right, #eff6ff, #ffffff); 
}
.box-pink { 
    border-top: 6px solid #ec4899; 
    background: linear-gradient(to bottom right, #fdf2f8, #ffffff); 
}
.box-orange { 
    border-top: 6px solid #f97316; 
    background: linear-gradient(to bottom right, #fff7ed, #ffffff); 
}

.notes-list {
    list-style: none;
    padding-left: 0.25rem;
}

.notes-list li {
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 2.25rem;
    font-size: 1.15rem;
    color: #334155;
    line-height: 1.7;
}

.notes-list li::before {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--primary);
    border-radius: 999px;
    position: absolute;
    left: 0;
    top: 0.55rem;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.highlight-box {
    background-color: #eff6ff;
    border-left: 5px solid #3b82f6;
    padding: 1.2rem 1.4rem;
    margin: 1.2rem 0;
    border-radius: 0 0.7rem 0.7rem 0;
}

.key-terms-box {
    background-color: #f9fafb;
    padding: 1.5rem 1.75rem;
    border-radius: 1rem;
    border: 2px dashed #bfdbfe;
}

.key-terms-title {
    color: #dc2626;
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.grid-terms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .content-card {
        padding: 1.25rem 1rem;
    }

    .section-title {
        font-size: 1.45rem;
    }

    .notes-list li {
        font-size: 1.1rem;
    }
}

/* Announcement Ticker */
.announcement-ticker {
    background: #eef2ff; /* Milder soft indigo/blue */
    color: #312e81; /* Deep indigo text for contrast */
    padding: 0.65rem 0;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #c7d2fe;
}

.ticker-content {
    display: inline-flex;
    padding-left: 100%;
    animation: ticker 35s linear infinite;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.ticker-content span {
    margin-right: 80px;
}

.ticker-content strong {
    color: var(--accent);
    font-weight: 800;
}

.ticker-content:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    z-index: 999;
    pointer-events: none;
}

.float-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.75rem;
    border-radius: 3rem;
    text-decoration: none;
    color: white !important;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2), 0 0 0 4px rgba(255,255,255,0.2);
    transition: var(--transition);
}

.float-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgba(0,0,0,0.3), 0 0 0 6px rgba(255,255,255,0.3);
}

.float-call {
    background: var(--primary);
}

.float-call:hover {
    background: var(--primary-dark);
}

.float-whatsapp {
    background: #25D366; /* Official WhatsApp Green */
}

.float-whatsapp:hover {
    background: #1da851;
}

.float-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
