/*
 * AI Resource Hub for Educators - Shared Stylesheet
 * ================================================
 */

/* CSS Variables */
:root {
    --primary: #1e3a5f;
    --secondary: #2563eb;
    --accent: #0ea5e9;
    --success: #059669;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --muted: #64748b;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    min-height: 100vh;
}

/* Navigation Buttons - Fixed Position */
.nav-buttons {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: #1e3a8a;
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s;
}

.nav-btn:hover {
    background: #1e40af;
}

/* Header - Default Style */
header {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    padding: 48px 20px;
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

header .tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Header - Large variant for hub */
header.header-large {
    padding: 60px 20px;
}

header.header-large h1 {
    font-size: 2.5rem;
}

header.header-large .tagline {
    font-size: 1.15rem;
}

/* Header - Gemini colors */
header.header-gemini {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc04 100%);
}

/* Header - NotebookLM colors */
header.header-notebooklm {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Header - Copilot colors */
header.header-copilot {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
}

/* Header - Beginner guide colors */
header.header-beginner {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Header - Intermediate guide colors */
header.header-intermediate {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Header - Advanced guide colors */
header.header-advanced {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Badge in header */
.badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 16px;
}

.level-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Header icon */
.header-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Main Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1000px;
}

/* Info/Instructions Panel */
.info-panel,
.instructions {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.info-panel h2,
.instructions h2 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.info-panel p,
.instructions p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.info-panel ul,
.info-panel ol,
.instructions ul,
.instructions ol {
    color: var(--text);
    font-size: 0.95rem;
    margin-left: 20px;
}

.info-panel li,
.instructions li {
    margin-bottom: 6px;
}

/* Cards Grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.cards-single {
    grid-template-columns: 1fr;
}

.cards-narrow {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card-inner {
    padding: 28px;
}

.card-inner-wide {
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: center;
}

@media (max-width: 700px) {
    .card-inner-wide {
        grid-template-columns: 1fr;
    }
}

/* Card Icon */
.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.card-icon-small {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Icon color variants */
.icon-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.icon-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.icon-green { background: linear-gradient(135deg, #10b981, #059669); }
.icon-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.icon-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.icon-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-slate { background: linear-gradient(135deg, #64748b, #475569); }

/* Card badge */
.card-badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.card-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.card-title-large {
    font-size: 1.5rem;
}

.card-audience {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.card-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 16px;
}

.card-count {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.card-features {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.card-features ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-features li {
    background: #f1f5f9;
    color: var(--text);
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 6px;
}

.card-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 12px;
}

.card-action span {
    transition: transform 0.2s ease;
}

.card:hover .card-action span {
    transform: translateX(4px);
}

/* Featured Info Box */
.featured-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
}

.featured-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.featured-info ol {
    font-size: 0.85rem;
    color: var(--text);
    margin-left: 18px;
}

.featured-info li {
    margin-bottom: 6px;
}

/* Guide Cards - Horizontal Layout */
.guide-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.guide-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.guide-level {
    padding: 24px;
    text-align: center;
    min-width: 100px;
}

.guide-level .level-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
}

.level-beginner {
    background: #dcfce7;
    color: #166534;
}

.level-intermediate {
    background: #fef3c7;
    color: #92400e;
}

.level-advanced {
    background: #fee2e2;
    color: #991b1b;
}

.guide-content {
    padding: 24px 20px;
    border-left: 1px solid var(--border);
}

.guide-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.guide-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.guide-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topic-tag {
    background: #f1f5f9;
    color: var(--text);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.guide-arrow {
    padding: 24px;
    color: var(--secondary);
    font-size: 1.5rem;
}

@media (max-width: 600px) {
    .guide-card {
        grid-template-columns: 1fr;
    }
    .guide-level {
        border-bottom: 1px solid var(--border);
    }
    .guide-content {
        border-left: none;
    }
    .guide-arrow {
        display: none;
    }
}

/* PDF Banner */
.pdf-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.pdf-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #92400e;
    font-weight: 500;
}

.pdf-banner-icon {
    font-size: 2rem;
}

.pdf-banner h3 {
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 4px;
}

.pdf-banner p {
    font-size: 0.85rem;
    color: #a16207;
    margin: 0;
}

.pdf-download-btn {
    background: #dc2626;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.pdf-download-btn:hover {
    background: #b91c1c;
}

/* Content Sections */
.section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.section h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2 .icon {
    font-size: 1.4rem;
}

.section h3 {
    font-size: 1rem;
    color: var(--primary);
    margin: 20px 0 10px;
    font-weight: 600;
}

.section p {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.section ul, .section ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.section li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Summary Box */
.summary-box {
    background: #eff6ff;
    border-left: 4px solid var(--secondary);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.summary-box h3 {
    color: var(--secondary);
    margin: 0 0 12px 0;
    font-size: 1rem;
}

.summary-box ul {
    margin: 0;
    padding-left: 20px;
}

.summary-box li {
    margin-bottom: 6px;
    color: var(--text);
}

/* Key Points Box */
.key-points {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 20px 0;
}

.key-points h3 {
    color: #166534;
    margin-top: 0;
    margin-bottom: 14px;
}

/* Tips Box */
.tips-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 24px;
}

.tips-box h3 {
    color: #1e40af;
    margin-top: 0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-box p, .tips-box li {
    margin-bottom: 12px;
}

/* Tip Box - Warning style */
.tip-box {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
}

.tip-box strong {
    color: #92400e;
}

.tip-box p {
    color: #78350f;
    margin: 0;
    font-size: 0.9rem;
}

/* Quick Start Box */
.quick-start {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 24px 28px;
    margin-top: 32px;
}

.quick-start h3 {
    font-size: 1.1rem;
    color: #1e40af;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-start ol {
    margin-left: 20px;
    color: var(--text);
}

.quick-start li {
    margin-bottom: 8px;
}

.quick-start code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Prompt Display */
.prompt-container {
    position: relative;
    margin-top: 16px;
}

.prompt-box {
    background: #0f172a;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.88rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #1d4ed8;
}

.copy-btn.copied {
    background: var(--success);
}

/* Steps */
.steps {
    counter-reset: step-counter;
}

.step {
    position: relative;
    padding-left: 50px;
    margin-bottom: 24px;
}

.step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--secondary), #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.step h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.step code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--primary);
}

/* Steps - Alternate style for guides */
.step-alt {
    background: #f8fafc;
    border-left: 4px solid var(--secondary);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.step-alt::before {
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.step-alt strong {
    color: var(--primary);
}

/* Button Row */
.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* Open Gemini Button */
.open-gemini-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.open-gemini-btn:hover {
    background: linear-gradient(135deg, #5a95f5, #1557b0);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
    transform: translateY(-1px);
}

.open-gemini-btn.use-existing {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.open-gemini-btn.use-existing:hover {
    background: linear-gradient(135deg, #34d399, #047857);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.open-gemini-btn svg {
    width: 20px;
    height: 20px;
}

.btn-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 8px;
    margin-bottom: 20px;
}

/* Feature Table */
.feature-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.feature-table th {
    background: #f1f5f9;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--border);
}

.feature-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.feature-table tr:hover {
    background: #fafafa;
}

/* Navigation Footer */
.nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.nav-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-footer a:hover {
    background: #eff6ff;
}

.nav-footer .next {
    background: var(--secondary);
    color: white;
}

.nav-footer .next:hover {
    background: #1d4ed8;
}

/* Code styling */
code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Development Notice Banner */
.dev-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 auto;
    max-width: 1100px;
    margin-top: -20px;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.dev-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.dev-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.dev-banner-content h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-banner-content p {
    font-size: 0.9rem;
    color: #78350f;
    margin: 0;
    line-height: 1.6;
}

.dev-banner-content p:not(:last-child) {
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .dev-banner {
        margin: -10px 12px 0;
        padding: 16px 18px;
    }
    .dev-banner-inner {
        flex-direction: column;
        gap: 12px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* Body with nav padding (for pages with fixed nav) */
body.has-fixed-nav {
    padding-top: 60px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    header.header-large h1 {
        font-size: 2rem;
    }

    .section {
        padding: 20px;
    }

    .step::before {
        position: static;
        margin-bottom: 10px;
    }

    .feature-table {
        font-size: 0.8rem;
    }
}
