/* SchemaDive Theme CSS */
/* This file contains the common theme variables and styles for the entire application */

:root {
    /* Modern Light Color Palette */
    --color-white: #FFFFFF;
    --color-white-rgb: 255, 255, 255;
    --color-off-white: #F9FAFB;
    --color-off-white-rgb: 249, 250, 251;
    --color-light-gray: #F3F4F6;
    --color-medium-gray: #9CA3AF;
    --color-dark-gray: #111111;
    --color-text: #1F2937;
    --color-text-rgb: 31, 41, 55;
    --color-text-light: #6B7280;

    /* Dashboard Dark Background Colors */
    --color-bg-dark-1: #111111;
    --color-bg-dark-2: #1a1a1a;

    /* Primary Brand Colors - Yellow Theme */
    --color-primary: #FFD700; /* Yellow from dashboard */
    --color-primary-dark: #f0c800; /* Darker yellow from dashboard hover */
    --color-primary-light: #FFE866; /* Lighter yellow */
    --color-accent: #FFD700; /* Same as primary for consistency */
    --color-accent-dark: #f0c800; /* Same as primary-dark for consistency */

    /* Accent Colors */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-error: #EF4444;
    --color-error-light: #FEE2E2;
    --color-warning: #FFD700;
    --color-warning-light: #FFF8CC;
    --color-info: #FFD700; /* Matches primary */
    --color-info-light: #FFF8CC; /* Matches primary light */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px rgba(255, 215, 0, 0.3); /* Yellow focus ring */
    --shadow-focus-error: 0 0 0 3px rgba(239, 68, 68, 0.25);
    --shadow-focus-success: 0 0 0 3px rgba(16, 185, 129, 0.25);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index layers */
    --z-index-dropdown: 1000;
    --z-index-modal: 2000;
    --z-index-toast: 3000;
    --z-index-overlay: 4000;
}

/* Dark mode styles - Applied when user prefers dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode Color Palette */
        --color-white: #2D2D2D; /* Dark background instead of white */
        --color-white-rgb: 45, 45, 45;
        --color-off-white: #1A1A1A; /* Darker background */
        --color-off-white-rgb: 26, 26, 26;
        --color-light-gray: #374151;
        --color-medium-gray: #6B7280;
        --color-dark-gray: #9CA3AF;
        --color-text: #F9FAFB; /* Light text on dark background */
        --color-text-rgb: 249, 250, 251;
        --color-text-light: #D1D5DB;

        /* Primary Brand Colors - Yellow Theme for Dark Mode */
        --color-primary: #FFD700; /* Same yellow from dashboard */
        --color-primary-dark: #f0c800; /* Same darker yellow from dashboard */
        --color-primary-light: #FFE866; /* Adjusted for dark mode */
        --color-accent: #FFD700; /* Same as primary for consistency */
        --color-accent-dark: #f0c800; /* Same as primary-dark for consistency */

        /* Accent Colors for Dark Mode */
        --color-success: #10B981;
        --color-success-light: #059669;
        --color-error: #EF4444;
        --color-error-light: #B91C1C;
        --color-warning: #FFD700;
        --color-warning-light: #f0c800;
        --color-info: #FFD700;
        --color-info-light: #f0c800;

        /* Shadows for Dark Mode */
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
        --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
        --shadow-focus: 0 0 0 3px rgba(255, 215, 0, 0.4);
        --shadow-focus-error: 0 0 0 3px rgba(239, 68, 68, 0.4);
        --shadow-focus-success: 0 0 0 3px rgba(16, 185, 129, 0.4);
    }
}

/* Base styles that should be consistent across all pages */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-dark-1);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Common header styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background-color: transparent;
    z-index: 1000;
    box-sizing: border-box;
    transition: all var(--transition-normal);
}

.main-header.scrolled {
    background-color: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.logo-container img {
    height: 40px;
}

.main-nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--color-light-gray);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.main-nav a:hover {
    color: var(--color-primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-menu a {
    color: var(--color-light-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.user-menu a:hover {
    color: var(--color-primary);
}

.signin-btn {
    padding: 8px 20px;
    background-color: var(--color-primary);
    color: var(--color-dark-gray);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.signin-btn:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Common footer styles */
.main-footer {
    background-color: var(--color-bg-dark-1);
    padding: 2rem 0;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid #333;
    margin-top: 2rem;
}

.footer-content {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--color-light-gray);
    text-decoration: none; 
    margin: 0 15px; 
    transition: color var(--transition-fast);
    font-weight: 500;
}

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

/* Mobile navigation */
.mobile-nav-toggle, .mobile-nav-container {
    display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .main-header { 
        min-height: 60px; 
    }

    .main-nav, 
    .user-menu { 
        display: none; 
    }

    .signin-btn { 
        display: none;
    }

    .mobile-nav-toggle { 
        display: block; 
        background: none;
        border: none;
        cursor: pointer;
        padding: 15px;
        z-index: 1001;
        position: relative;
        width: 40px;
        height: 40px;
    }

    .hamburger-box { 
        position: relative; 
        width: 25px; 
        height: 2px; 
    }

    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
        position: absolute;
        width: 25px;
        height: 2px;
        background-color: var(--color-light-gray);
        transition: transform 0.2s ease-out;
    }

    .hamburger-inner { 
        display: block; 
        top: 50%; 
        transform: translateY(-50%); 
    }

    .hamburger-inner::before, .hamburger-inner::after { 
        content: ''; 
        display: block; 
    }

    .hamburger-inner::before { 
        transform: translateY(-8px); 
    }

    .hamburger-inner::after { 
        transform: translateY(8px); 
    }

    .mobile-nav-toggle[aria-expanded="true"] .hamburger-inner { 
        transform: rotate(45deg); 
    }

    .mobile-nav-toggle[aria-expanded="true"] .hamburger-inner::before { 
        transform: rotate(0) translateY(0); 
        opacity: 0; 
    }

    .mobile-nav-toggle[aria-expanded="true"] .hamburger-inner::after { 
        transform: rotate(-90deg) translateX(8px); 
    }

    .mobile-nav-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(5px);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 999;
        gap: 1.5rem;
    }

    .mobile-nav-container.active {
        transform: translateX(0);
    }

    .mobile-nav-container a {
        color: var(--color-light-gray);
        font-size: 1.5rem;
        font-weight: 500;
        text-decoration: none;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .mobile-nav-container.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-nav-container.active a:nth-child(1) { transition-delay: 0.2s; }
    .mobile-nav-container.active a:nth-child(2) { transition-delay: 0.25s; }
    .mobile-nav-container.active a:nth-child(3) { transition-delay: 0.3s; }
    .mobile-nav-container.active a:nth-child(4) { transition-delay: 0.35s; }

    .mobile-nav-container a.signin-btn {
        font-size: 1.1rem;
        padding: 10px 25px;
        margin-top: 1rem;
    }
}
