/* ==========================================
   CSS Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-dark: #080a11;
    --bg-card-dark: #111523; /* Corporate Navy Blue */
    --bg-glass: rgba(17, 21, 35, 0.75);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --brand-red: #951217; /* Corporate Deep Maroon Red */
    --brand-teal: #196634; /* Corporate Green */
    --brand-gold: #D39B67; /* Corporate Gold */
    --text-white: #ffffff;
    --text-muted: #8b9bb4;
    --text-dark: #1e293b;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ==========================================
   Page Navigation States
   ========================================== */
.page-container {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.page-container.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* ==========================================
   Landing & Registration Styles
   ========================================== */
#landing-page {
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Floating Decorative Circles */
.landing-bg-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: floatAnim 10s ease-in-out infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background-color: var(--brand-red);
    top: -50px;
    left: -50px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background-color: var(--brand-teal);
    bottom: -100px;
    right: -100px;
    animation-delay: -3s;
}

.circle-3 {
    width: 250px;
    height: 250px;
    background-color: #7E61F1;
    top: 40%;
    left: 80%;
    animation-delay: -6s;
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.landing-card-wrapper {
    width: 100%;
    max-width: 500px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 40px 30px;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntry {
    to { transform: translateY(0); }
}

.brand-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo {
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

.brand-title {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-white);
}

.brand-tagline {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

.registration-container {
    width: 100%;
}

.form-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Input Fields */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field-wrapper {
    position: relative;
    width: 100%;
}

.input-field-wrapper input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.input-field-wrapper input:focus {
    outline: none;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.05);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-teal));
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.input-field-wrapper input:focus ~ .focus-border {
    width: 100%;
}

.error-msg {
    color: #ff4a4a;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.input-group.invalid .error-msg {
    display: block;
}

.input-group.invalid input {
    border-color: #ff4a4a;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--brand-red) 0%, #a02829 100%);
    border: none;
    border-radius: 12px;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(192, 58, 59, 0.4);
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 58, 59, 0.6);
}

.submit-btn:active {
    transform: translateY(0);
}

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

.submit-btn:hover .btn-shine {
    left: 100%;
    transition: 0.7s;
}

.landing-footer {
    position: absolute;
    bottom: 20px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    z-index: 2;
}

/* ==========================================
   Password Modal Overlay & Card
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-glass);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    padding: 30px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.modal-body {
    margin-bottom: 25px;
}

.modal-footer {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.modal-btn.cancel-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
}

.modal-btn.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.modal-btn.verify-btn {
    background: var(--brand-teal);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(25, 102, 52, 0.3);
}

.modal-btn.verify-btn:hover {
    background: #238245; /* Lighter brand green */
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(25, 102, 52, 0.4);
}

/* ==========================================
   Main Application Page Styles
   ========================================== */
#app-page {
    background-color: var(--bg-dark);
}

/* Header Section */
.app-header {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-logo {
    height: 45px;
    object-fit: contain;
}

.header-text h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.school-label {
    font-size: 11px;
    color: var(--brand-teal);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controls Box */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box-wrapper {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 11px 40px 11px 42px;
    color: var(--text-white);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.search-box-wrapper input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-teal);
    box-shadow: 0 0 15px rgba(25, 102, 52, 0.25);
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: none;
}

.clear-btn.active {
    display: block;
}

.clear-btn:hover {
    color: var(--text-white);
}

/* User Badge */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 6px 6px 6px 14px;
    border-radius: 30px;
}

.user-welcome {
    font-size: 13px;
    color: var(--text-muted);
}

.user-welcome strong {
    color: var(--text-white);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--text-white);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.logout-icon {
    width: 14px;
    height: 14px;
}

.logout-btn:hover {
    background: rgba(192, 58, 59, 0.1);
    border-color: var(--brand-red);
    color: #ff4a4a;
}

/* ==========================================
   Filter Bar Styles
   ========================================== */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 5%;
    background: rgba(10, 14, 23, 0.4);
    position: sticky;
    top: 76px; /* Below Header */
    z-index: 90;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 10px 20px;
    border-radius: 30px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
}

.filter-tab.active {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(34, 149, 150, 0.3);
}

/* ==========================================
   Phonetics Grid & Groups
   ========================================== */
.chart-main-content {
    padding: 10px 5% 100px 5%;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.phoneme-group-section {
    margin-bottom: 45px;
    animation: fadeInUp 0.5s ease-out forwards;
}

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

/* Group Headers */
.section-banner {
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.monophthong-banner {
    background: linear-gradient(135deg, var(--brand-gold) 0%, #a47043 100%);
}

.diphthong-banner {
    background: linear-gradient(135deg, var(--brand-red) 0%, #610b0f 100%);
}

.consonant-banner {
    background: linear-gradient(135deg, var(--brand-teal) 0%, #104121 100%);
}

.banner-title h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-title p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 3px;
}

/* Responsive Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ==========================================
   Interactive Card Styles
   ========================================== */
.phoneme-card {
    display: flex;
    height: 120px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
}

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

/* Card Left Side: Phonetic Symbol */
.card-symbol-trigger {
    width: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.card-symbol-trigger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0);
    transition: var(--transition-smooth);
}

.card-symbol-trigger:hover::after {
    background-color: rgba(255, 255, 255, 0.1);
}

.card-symbol-trigger h2 {
    font-size: 32px;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Play Icons Overlay */
.play-icon-overlay {
    position: absolute;
    width: 24px;
    height: 24px;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: var(--transition-smooth);
    z-index: 2;
}

.play-icon-overlay svg {
    width: 12px;
    height: 12px;
    fill: var(--text-white);
}

.card-symbol-trigger:hover .play-icon-overlay {
    opacity: 1;
    transform: scale(1.1);
}

/* Card Right Side: Word, IPA & Image */
.card-details-trigger {
    width: 65%;
    display: flex;
    background: var(--text-white);
    color: var(--text-dark);
    padding: 12px 15px;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.card-details-trigger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: var(--transition-smooth);
}

.card-details-trigger:hover::after {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Thumbnail Image container */
.card-image-box {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.card-details-trigger:hover .card-image-box img {
    transform: scale(1.08);
}

/* Text Container */
.card-text-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.card-text-box h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 2px;
    text-transform: capitalize;
}

.card-text-box p {
    font-size: 13px;
    color: #475569;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

/* ==========================================
   Active Playing States & Wave Animations
   ========================================== */
.phoneme-card.playing-symbol {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.phoneme-card.playing-word {
    box-shadow: 0 0 20px rgba(192, 58, 59, 0.2);
    border-color: var(--brand-red);
}

.phoneme-card.playing-symbol .card-symbol-trigger::after {
    background-color: rgba(255, 255, 255, 0.15);
}

.phoneme-card.playing-word .card-details-trigger::after {
    background-color: rgba(192, 58, 59, 0.05);
}

/* Sound Wave animation in cards */
.card-wave-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    height: 12px;
    align-items: flex-end;
}

.card-wave-overlay span {
    width: 2px;
    background: var(--brand-red);
    height: 2px;
    border-radius: 1px;
    animation: bounceWave 0.8s ease-in-out infinite alternate;
}

.card-wave-overlay span:nth-child(2) { animation-delay: 0.15s; }
.card-wave-overlay span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounceWave {
    from { height: 2px; }
    to { height: 12px; }
}

/* ==========================================
   Sticky Audio Playing Bar (Bottom)
   ========================================== */
.active-player-bar {
    position: fixed;
    bottom: -80px; /* Hidden initially */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(18, 24, 36, 0.95);
    border: 1px solid var(--brand-teal);
    border-radius: 40px;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.active-player-bar.active {
    bottom: 25px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-text {
    font-size: 13px;
    color: var(--text-white);
}

.player-text strong {
    color: var(--brand-teal);
}

/* Player Bar Sound Wave */
.sound-wave-anim {
    display: flex;
    gap: 3px;
    height: 16px;
    align-items: flex-end;
}

.sound-wave-anim span {
    width: 3px;
    height: 3px;
    background-color: var(--brand-teal);
    border-radius: 1.5px;
    animation: waveBar 0.6s linear infinite alternate;
}

.sound-wave-anim span:nth-child(2) { animation-delay: 0.1s; }
.sound-wave-anim span:nth-child(3) { animation-delay: 0.2s; }
.sound-wave-anim span:nth-child(4) { animation-delay: 0.3s; }
.sound-wave-anim span:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveBar {
    from { height: 3px; }
    to { height: 16px; }
}

.stop-audio-btn {
    background: var(--brand-red);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-white);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.stop-audio-btn:hover {
    background: #ff4a4a;
    transform: scale(1.05);
}

/* ==========================================
   No Results Page
   ========================================== */
.no-results-card {
    display: none;
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    max-width: 400px;
    margin: 40px auto;
    animation: fadeIn 0.4s ease;
}

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

.no-results-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.no-results-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    margin-bottom: 8px;
}

.no-results-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.reset-search-btn {
    background: var(--brand-teal);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    color: var(--text-white);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.reset-search-btn:hover {
    background: #238245;
    transform: translateY(-1px);
}

/* ==========================================
   Footer Section
   ========================================== */
.app-footer {
    border-top: 1px solid var(--border-glass);
    background: #070a10;
    padding: 40px 5% 20px 5%;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    height: 45px;
    object-fit: contain;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links ul li a:hover {
    color: var(--brand-teal);
}

.footer-contact h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.whatsapp-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(25, 102, 52, 0.15);
    border: 1px solid rgba(25, 102, 52, 0.3);
    padding: 10px 18px;
    border-radius: 25px;
    color: var(--text-white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.whatsapp-contact-link:hover {
    background: var(--brand-teal); /* Green */
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(25, 102, 52, 0.4);
    transform: translateY(-2px);
}

.whatsapp-icon {
    width: 18px;
    height: 18px;
    color: #25D366; /* WhatsApp brand green */
    transition: var(--transition-smooth);
}

.whatsapp-contact-link:hover .whatsapp-icon {
    color: #ffffff;
}

.footer-copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.footer-copyright p {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================
   Multi-Tab Navigation Panels
   ========================================== */
.app-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.app-panel.active {
    display: block;
    opacity: 1;
}

#panel-chart.active {
    display: block;
}

/* Flashcards Panel Styles */
.flashcards-reader-container {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

.reader-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    color: var(--text-white);
    margin-bottom: 6px;
}

.reader-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.reader-viewport {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.reader-frame {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.15);
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.reader-frame img {
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.reader-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.reader-nav-btn:hover:not(:disabled) {
    background: var(--brand-teal);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(25, 102, 52, 0.5);
    border-color: transparent;
}

.reader-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.reader-nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Loading spinner */
.reader-spinner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--brand-teal);
    border-radius: 50%;
    animation: reader-spin 0.8s linear infinite;
    display: none;
    z-index: 5;
}

.reader-spinner.active {
    display: block;
}

@keyframes reader-spin {
    to { transform: rotate(360deg); }
}

.reader-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-glass);
    flex-wrap: wrap;
    gap: 15px;
}

.page-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-selector-wrapper label {
    font-size: 13px;
    color: var(--text-muted);
}

.page-select-dropdown {
    background: #0f172a;
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.page-select-dropdown:focus {
    border-color: var(--brand-teal);
    box-shadow: 0 0 8px rgba(25, 102, 52, 0.3);
}

.page-indicator {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
}

.reader-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.reader-download-btn:hover {
    background: var(--brand-teal);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 102, 52, 0.3);
}

/* Mobile responsive fixes */
@media (max-width: 600px) {
    .reader-viewport {
        gap: 10px;
    }
    
    .reader-frame {
        min-height: 250px;
        padding: 10px;
    }
    
    .reader-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .reader-nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .reader-controls-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Movies Panel Styles */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.movie-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.15);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.movie-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.movie-info h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-white);
}

.movie-info p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Certificate Panel Styles */
.certificate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 30px;
}

.certificate-wrapper {
    background-color: #fdfcf9;
    color: #1a202c;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 1.414 / 1; /* Standard A4 landscape aspect ratio */
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    position: relative;
}

.cert-border-outer {
    border: 4px solid var(--brand-gold); /* Corporate Gold */
    height: 100%;
    padding: 6px;
}

.cert-border-inner {
    border: 1px solid var(--brand-gold);
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.cert-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    justify-content: space-between;
}

.cert-logo-section {
    margin-bottom: 10px;
}

.cert-logo {
    height: 45px;
    object-fit: contain;
}

.cert-title {
    font-family: 'Georgia', serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--brand-red); /* Corporate Deep Maroon Red */
    text-transform: uppercase;
    margin-bottom: 5px;
}

.cert-award {
    font-size: 14px;
    font-style: italic;
    color: #718096;
}

.cert-recipient-name {
    font-family: 'Georgia', serif;
    font-size: 36px;
    font-weight: 700;
    font-style: italic;
    color: #1a202c;
    border-bottom: 2px solid var(--brand-gold);
    padding: 2px 30px;
    margin: 10px 0;
    max-width: 85%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-reason {
    font-size: 13px;
    color: #4a5568;
    max-width: 80%;
    line-height: 1.4;
}

.cert-course {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    text-transform: uppercase;
    color: var(--brand-gold);
    letter-spacing: 1.5px;
    margin: 5px 0 15px 0;
}

.cert-details {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-top: 10px;
}

.cert-school-section, .cert-date-section {
    width: 30%;
}

.cert-school-title, .cert-date-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a0aec0;
    margin-bottom: 3px;
}

.cert-school-name, .cert-date {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
}

.cert-seal {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #fff3b0 0%, var(--brand-gold) 100%);
    border: 3px double var(--brand-gold);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.seal-logo {
    font-size: 18px;
    font-weight: 900;
    color: var(--brand-red);
    letter-spacing: -1px;
}

.seal-text {
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-red);
    text-align: center;
    line-height: 1;
    margin-top: 2px;
    max-width: 70px;
}

.cert-signatures {
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin-top: 15px;
}

.signature-box {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signature-line {
    border-bottom: 1px solid #cbd5e0;
    width: 100%;
    margin-bottom: 5px;
    font-size: 18px;
    color: #4a5568;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.font-signature {
    font-family: 'Georgia', cursive, serif;
    font-style: italic;
}

.signature-title {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
}

.print-cert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-teal);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(25, 102, 52, 0.3);
}

.print-cert-btn:hover {
    background: #238245;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 102, 52, 0.5);
}

/* ==========================================
   Print Style Sheet Integration
   ========================================== */
@media print {
    body * {
        visibility: hidden;
        background: none !important;
    }
    
    #printable-certificate, #printable-certificate * {
        visibility: visible;
    }
    
    #printable-certificate {
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 24px;
        box-shadow: none;
        border: none;
        background-color: #fdfcf9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        z-index: 99999;
    }
    
    .cert-border-outer {
        border: 4px solid var(--brand-gold) !important;
    }
    
    .cert-border-inner {
        border: 1px solid var(--brand-gold) !important;
    }
    
    .cert-recipient-name {
        border-bottom: 2px solid var(--brand-gold) !important;
    }
    
    .cert-seal {
        background: radial-gradient(circle, #fff3b0 0%, var(--brand-gold) 100%) !important;
        border: 3px double var(--brand-gold) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==========================================
   Responsive Media Queries
   ========================================== */

/* Large Desktop */
@media (min-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop / Tablet Landscape */
@media (max-width: 1024px) {
    .app-header {
        padding: 15px 3%;
    }
    .filter-bar {
        top: 76px;
    }
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 15px;
    }
    .filter-bar {
        top: 133px; /* Adjusted since header is taller */
        padding: 10px;
        gap: 6px;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .filter-tab {
        flex-shrink: 0;
        padding: 8px 16px;
    }
    .search-box-wrapper {
        width: 100%;
    }
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-card-wrapper {
        padding: 30px 20px;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .app-header {
        gap: 10px;
    }
    .user-profile-badge {
        justify-content: space-between;
    }
    .home-link {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 5px;
    }
    .header-logo-section {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    .header-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .filter-bar {
        top: 198px; /* Taller stacked header */
    }
    .phoneme-card {
        height: 100px;
    }
    .card-symbol-trigger h2 {
        font-size: 26px;
    }
    .card-image-box {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    .card-text-box h3 {
        font-size: 15px;
    }
    .card-text-box p {
        font-size: 12px;
    }
    .brand-title {
        font-size: 24px;
    }
    .landing-card-wrapper {
        border-radius: 16px;
    }
}

/* ==========================================
   Floating WhatsApp Widget Styles
   ========================================== */
.floating-whatsapp-widget {
    position: fixed;
    bottom: 95px; /* Sits nicely above sticky player bar */
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), 0 0 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    cursor: pointer;
}

.floating-whatsapp-widget svg {
    width: 32px;
    height: 32px;
}

.floating-whatsapp-widget:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #20ba5a;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4), 0 0 25px rgba(37, 211, 102, 0.6);
}

/* Widget Tooltip */
.widget-tooltip {
    position: absolute;
    right: 75px;
    background: #111523;
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.floating-whatsapp-widget:hover .widget-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Hide widget when printing */
@media print {
    .floating-whatsapp-widget {
        display: none !important;
    }
}

/* Reposition floating widget on small mobile devices to avoid overlap */
@media (max-width: 768px) {
    .floating-whatsapp-widget {
        bottom: 100px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .floating-whatsapp-widget svg {
        width: 26px;
        height: 26px;
    }
    .widget-tooltip {
        display: none; /* Hide tooltip on touch screens */
    }
}

