/* ============================================================
   HAYYO ACADEMY - GOOGLE STYLE CSS
   Mobile-first, responsive, clean
   ============================================================ */

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

:root {
    --google-blue: #1a73e8;
    --google-blue-dark: #1557b0;
    --google-green: #0b4f37;
    --google-gold: #fcd116;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-grey: #fafafa;
    --border: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(60,64,67,0.15);
    --shadow-md: 0 2px 8px rgba(60,64,67,0.15);
    --shadow-lg: 0 4px 16px rgba(60,64,67,0.2);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* HIDDEN */
.hidden {
    display: none !important;
}

/* HEADER */
.header {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text h1 {
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--google-green);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.lang-switcher {
    display: flex;
    gap: 6px;
}

.lang-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--google-blue);
    color: white;
    border-color: var(--google-blue);
}

.lang-btn:hover {
    background: var(--google-blue-dark);
    color: white;
}

/* MAIN */
.main {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* HERO SECTION */
.hero {
    margin-bottom: 32px;
}

.hero-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f0fe 100%);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.hero-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--google-green);
    margin-bottom: 12px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.secrets-list {
    list-style: none;
    text-align: left;
    max-width: 340px;
    margin: 0 auto 24px;
}

.secrets-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.secrets-list .check {
    font-size: 18px;
}

/* BUTTONS */
.btn-primary {
    background: var(--google-blue);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: 'Google Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: var(--google-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 18px;
}

.btn-secondary {
    background: white;
    color: var(--google-blue);
    border: 1px solid var(--google-blue);
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f0f6ff;
}

/* LEARN SECTION */
.learn-section {
    margin-bottom: 32px;
}

.section-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.learn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.learn-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

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

.learn-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.learn-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.learn-card p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* FOOTER */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 24px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.footer p {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

/* LOADING OVERLAY */
.loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 16px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--google-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================================
   DASHBOARD PAGES
   ============================================================ */

.dashboard-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* USER INFO BAR */
.user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .email {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FREE LESSON CARD */
.free-lesson-card {
    background: white;
    border: 2px solid var(--google-green);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.free-lesson-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.free-badge {
    background: var(--google-green);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lesson-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-bottom: 12px;
}

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

.lesson-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.lesson-description strong {
    color: var(--text-primary);
}

.lesson-description ul {
    list-style: none;
    margin-top: 6px;
}

.lesson-description li {
    padding: 2px 0;
    font-size: 12px;
}

/* LESSONS GRID */
.lessons-section {
    margin-bottom: 28px;
}

.lessons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .lessons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .lessons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.lesson-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.lesson-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.lesson-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
    overflow: hidden;
}

.lesson-thumbnail img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lesson-thumbnail .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    font-size: 40px;
    color: white;
}

.lesson-thumbnail .overlay.locked {
    background: rgba(0, 0, 0, 0.55);
}

.lesson-info {
    padding: 12px;
}

.lesson-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.lesson-info .lesson-topic {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.lesson-info .lesson-status {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.lesson-status.free {
    color: var(--google-green);
}

.lesson-status.locked {
    color: #d93025;
}

/* PAYMENT FORM */
.payment-main {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.payment-card {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.payment-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--google-green);
    text-align: center;
    margin-bottom: 8px;
}

.payment-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
}

.price-highlight {
    background: linear-gradient(135deg, var(--google-green) 0%, #1a7a55 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.price-highlight .amount {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Google Sans', sans-serif;
}

.price-highlight .currency {
    font-size: 16px;
    margin-left: 4px;
}

/* PAYMENT INFO BOX */
.payment-info {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.payment-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.payment-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.payment-method:last-child {
    border-bottom: none;
}

.payment-method .label {
    color: var(--text-secondary);
}

.payment-method .value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Roboto Mono', monospace;
}

/* FORM */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-group input[type="file"]:hover {
    border-color: var(--google-blue);
    background: #f0f6ff;
}

.form-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

/* SUCCESS PAGE */
.success-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 60px 16px 40px;
    text-align: center;
}

.success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--google-green);
    margin-bottom: 12px;
}

.success-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.success-message strong {
    color: var(--text-primary);
}

/* ADMIN DASHBOARD */
.admin-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-blue-dark) 100%);
    color: white;
    padding: 16px 12px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-family: 'Google Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-section {
    margin-bottom: 28px;
}

.admin-section h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.student-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.student-card.pending {
    border-left: 4px solid #fbbc04;
}

.student-card.approved {
    border-left: 4px solid #34a853;
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.student-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.student-email,
.student-phone,
.student-txn,
.student-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    word-break: break-all;
}

.student-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-approve {
    background: #34a853;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-approve:hover {
    background: #2d9249;
}

.btn-view {
    background: white;
    color: var(--google-blue);
    border: 1px solid var(--google-blue);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-view:hover {
    background: #f0f6ff;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* UTILITY CLASSES */
.hidden {
    display: none !important;
}

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

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ============================================================
   PENDING STATUS STYLES
   ============================================================ */

.pending-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #fbbc04;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(251, 188, 4, 0.2);
}

.pending-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

.pending-content {
    flex: 1;
}

.pending-content h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #8a6d00;
    margin-bottom: 6px;
}

.pending-content p {
    font-size: 13px;
    color: #8a6d00;
    line-height: 1.5;
    margin-bottom: 4px;
}

.pending-sub {
    font-size: 12px !important;
    opacity: 0.8;
}

.lesson-status.pending {
    color: #fbbc04;
    font-weight: 600;
}

.lesson-thumbnail .overlay.pending {
    background: rgba(251, 188, 4, 0.5);
    color: white;
    font-size: 36px;
}

/* ============================================================
   CERTIFICATE CTA
   ============================================================ */
.certificate-section {
    margin-top: 28px;
}

.cert-cta-card {
    background: linear-gradient(135deg, #0b4f37 0%, #1a7a55 100%);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 16px rgba(11, 79, 55, 0.3);
}

.cert-cta-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.cert-cta-card h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.cert-cta-card p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.9);
}

.btn-cert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    color: #0b4f37;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: 'Google Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-cert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* MOBILE RESPONSIVE */
@media (max-width: 480px) {
    .hero-card {
        padding: 24px 16px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .learn-grid {
        grid-template-columns: 1fr;
    }
    
    .learn-card {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px 16px;
    }
    
    .learn-icon {
        font-size: 28px;
        margin-bottom: 0;
    }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
