/* Modern Design System for Certificate Generation System */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: #151c2c;
    --bg-input: #1e293b;
    --border-color: #2a364f;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --teal: #14b8a6;
    --teal-dark: #0f3b48;
    --text-title: #ffffff;
    --text-body: #cbd5e1;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(20, 184, 166, 0.08) 0%, transparent 40%);
}

.navbar {
    background: rgba(21, 28, 44, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.site-logo {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-text h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-title);
    line-height: 1.2;
}

.brand-text p {
    font-size: 12px;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.nav-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.nav-btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-body);
}

.nav-btn-outline:hover {
    background: var(--bg-input);
    color: white;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    flex: 1;
}

.hero-header {
    text-align: center;
    margin-bottom: 36px;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-header p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.search-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 36px;
}

.search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.submit-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.quick-emails {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.email-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-pill:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s ease;
}

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

.student-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.student-info h3 {
    font-size: 22px;
    color: var(--text-title);
    font-weight: 700;
    margin-bottom: 4px;
}

.student-info p {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.info-chip {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--teal);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-icon-label {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: #334155;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.cert-preview-wrapper {
    background: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cert-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.cert-image:hover {
    transform: scale(1.01);
}

.alert-card {
    padding: 20px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.alert-danger-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

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

.footer {
    border-top: 1px solid var(--border-color);
    padding: 24px 32px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
}

/* Print Specific Styles */
@media print {
    body { background: white; color: black; }
    .navbar, .search-card, .action-buttons, .hero-header, .footer, .badge-tag { display: none !important; }
    .container { margin: 0; padding: 0; max-width: 100%; }
    .result-card { border: none; padding: 0; box-shadow: none; background: white; }
    .cert-preview-wrapper { padding: 0; background: white; border: none; }
    .cert-image { width: 100%; max-width: 100%; box-shadow: none; }
}
