/* CertifyPro Design System - Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #8b5cf6;       /* Violet 500 */
    --primary-hover: #7c3aed; /* Violet 600 */
    --secondary: #0f172a;     /* Slate 900 */
    --accent: #ec4899;        /* Pink 500 */
    
    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-body: #020617;       /* Slate 950 */
    --bg-surface: rgba(15, 23, 42, 0.6);    /* Slate 900 with opacity */
    --bg-alt: rgba(30, 41, 59, 0.6);        /* Slate 800 with opacity */
    --bg-input: rgba(15, 23, 42, 0.4);      /* Darker transparent */

    /* Text */
    --text-main: #f8fafc;     /* Slate 50 */
    --text-muted: #94a3b8;    /* Slate 400 */
    --text-light: #64748b;    /* Slate 500 */
    --text-white: #ffffff;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);  /* Transparent White */
    --border-hover: rgba(255, 255, 255, 0.2);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    
    /* Background Gradients */
    background: 
        radial-gradient(circle at 90% 0%, rgba(168, 85, 247, 0.4) 0%, transparent 50%), /* Purple */
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.4) 0%, transparent 50%), /* Blue */
        radial-gradient(circle at 80% 100%, rgba(236, 72, 153, 0.4) 0%, transparent 50%), /* Pink */
        var(--bg-body);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { color: var(--text-muted); }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span { 
    color: var(--primary);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 99;
    flex-direction: column;
    gap: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

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

.mobile-nav.active {
    display: flex;
}

.mobile-nav .nav-link,
.mobile-nav .btn {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    text-align: center;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
    background: var(--bg-alt);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-surface);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: var(--bg-surface);
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.grid { display: grid; }
.w-full { width: 100%; }

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    animation: fadeInUp 0.7s ease;
}

.badge-label {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-radius: 999px;
}

.badge-text {
    margin-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-gradient-text {
    background: linear-gradient(to right, #2563eb, #9333ea, #db2777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: white;
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-main);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
}

@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
    
    .hero {
        padding: 4rem 0;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 1.875rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .nav-links { 
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .hero {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero .btn {
        width: 100%;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-grid { 
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .verification-wrapper {
        padding: 1rem;
    }
    
    .verification-wrapper .container {
        padding: 1.5rem;
    }
    
    .verification-wrapper .header {
        padding: 1.5rem;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    .hero h1 { font-size: 1.625rem; }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .container {
        padding: 0 0.875rem;
    }
    
    .navbar {
        padding: 0.875rem 1rem;
    }
    
    .logo {
        font-size: 1.125rem;
    }
}

/* Verification Page Styles */
.verification-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.verification-wrapper .container {
    max-width: 800px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    border: 1px solid var(--border-color);
}

.verification-wrapper .header {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white;
    padding: 40px;
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: -40px -40px 40px -40px;
    position: relative;
    overflow: hidden;
}

.verification-wrapper .header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.verification-wrapper .header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    color: white;
}

.verification-wrapper .header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
}

.verification-wrapper .content {
    padding: 0;
}

.search-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px;
    background: var(--bg-alt);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.tab-btn:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
    color: var(--text-main);
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.search-section {
    margin-bottom: 30px;
}

.search-section input {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    color: var(--text-main);
}

.search-section input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-section button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.search-section button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.result {
    display: none;
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-alt);
}

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

.result.show {
    display: block;
}

.result-header {
    padding: 30px;
    text-align: center;
    color: white;
}

.result-header.valid {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.result-header.invalid {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.result-header h2 {
    margin: 0;
    font-size: 2em;
    color: white;
}

.result-header p {
    margin: 10px 0 0 0;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.9);
}

.result-body {
    padding: 30px;
    background: var(--bg-surface);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cert-card {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.cert-field {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border-color);
}

.cert-field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.cert-field .value {
    font-size: 16px;
    color: var(--text-main);
    font-weight: 500;
}

.cert-id {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    word-break: break-all;
    font-size: 14px;
    border: 2px dashed var(--primary);
    margin-top: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid var(--bg-alt);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
}

.config-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.config-notice h3 {
    margin: 0 0 10px 0;
    color: var(--warning);
}

.config-notice p {
    color: var(--text-muted);
}

.config-notice code {
    background: var(--bg-body);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--text-main);
}
