/* Philippine Amateur Radio Hub - Main Stylesheet */

/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #667eea;
    --accent: #f093fb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b, #334155);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.brand-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-greeting {
    color: var(--gray-600);
    font-weight: 500;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 99;
}

.mobile-menu.hidden {
    display: none;
}

.mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: var(--radius);
}

.mobile-link:hover {
    background: var(--gray-100);
}

.mobile-link.logout {
    color: var(--danger);
}

.mobile-link.signup {
    background: var(--primary);
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 5rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.flash-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 8rem);
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    padding: 6rem 2rem;
    text-align: center;
    color: var(--white);
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-title-gradient {
    background: linear-gradient(135deg, #fff, #bfdbfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-note {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Features Grid */
.features-section {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.feature-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
}

/* Steps Section */
.steps-section {
    padding: 4rem 2rem;
    background: var(--white);
    text-align: center;
}

.steps-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 3rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-item {
    padding: 2rem 1rem;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.step-desc {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Auth Section */
.auth-section {
    padding: 4rem 2rem;
    background: var(--gradient-secondary);
}

.auth-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-600);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-info {
    color: var(--white);
    text-align: center;
}

.auth-info-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.auth-info-desc {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    padding: 4rem 2rem;
    background: var(--gradient-dark);
    text-align: center;
    color: var(--white);
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Sponsor Banner */
.sponsor-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 1rem;
    text-align: center;
}

.sponsor-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sponsor-text {
    color: var(--white);
    font-weight: 500;
}

.sponsor-link {
    color: var(--white);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray-400);
}

.footer-links a:hover {
    color: var(--white);
}

/* Dashboard Styles */
.dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    min-height: calc(100vh - 4rem);
    padding: 3rem 1rem;
}

.dashboard-container {
    max-width: 80rem;
    margin: 0 auto;
}

.welcome-header {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-title {
    font-size: 2.25rem;
    font-weight: 300;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: var(--gray-500);
    font-weight: 300;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 300;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Elements Grid */
.elements-section {
    max-width: 56rem;
    margin: 0 auto 4rem;
}

.elements-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 2rem;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.element-card {
    display: block;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.2s ease;
}

.element-card:hover:not(.locked) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.element-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.element-num {
    font-size: 1.5rem;
    font-weight: 700;
}

.element-class {
    font-size: 0.875rem;
}

.element-class-c {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
}

.element-class-b {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.5);
}

.element-class-a {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.5);
}

/* Exam Review Styles */
.exam-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.exam-header-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.exam-title-group h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.exam-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

.license-badge {
    text-align: right;
}

.license-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.license-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.exam-start-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.exam-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.exam-prompt {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.exam-description {
    color: var(--gray-500);
    max-width: 400px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.btn-start-exam {
    background: var(--primary);
    color: white;
    padding: 0.875rem 3rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-start-exam:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.5);
    background: var(--primary-dark);
}

.exam-selector-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: white;
    color: var(--gray-600);
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}

.back-link:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
    color: var(--primary);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

/* Recent Activity */
.recent-activity {
    max-width: 42rem;
    margin: 0 auto;
}

.activity-title {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 1.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.activity-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 500;
}

.activity-name {
    font-weight: 500;
    color: var(--gray-800);
}

.activity-date {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.activity-score {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.score-passed {
    background: #d1fae5;
    color: #065f46;
}

.score-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--white);
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 2rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {

    .nav-links,
    .nav-auth {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .auth-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}