/* ===================================
   ORACNOOS - Base Styles
   Modern Reset & Foundation
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height-normal);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Animated Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(124, 77, 255, 0.05) 0%, transparent 50%);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 0;
    animation: pulse 10s ease-in-out infinite;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Light mode background pattern */
body.light-mode::before {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 229, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(124, 77, 255, 0.03) 0%, transparent 50%);
    opacity: 0.5;
}

body > * {
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-color);
    letter-spacing: -0.02em;
}

h1 { 
    font-size: var(--font-size-5xl); 
    font-weight: var(--font-weight-extrabold);
}
h2 { 
    font-size: var(--font-size-4xl); 
    font-weight: var(--font-weight-bold);
}
h3 { 
    font-size: var(--font-size-3xl); 
    font-weight: var(--font-weight-bold);
}
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

strong {
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
}

a:hover {
    color: var(--primary-light);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 400px);
    padding-top: var(--spacing-lg);
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: var(--bg-color);
    text-shadow: none;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

/* Scrollbar - Modern Design */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-secondary);
    transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

/* Focus Styles */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Buttons - Modern Design */
button, .btn {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading States */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    gap: var(--spacing-md);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Responsive Images */
picture img {
    width: 100%;
    height: auto;
}

/* Smooth Page Transitions */
.page-transition {
    animation: slideInUp 0.6s ease-out;
}

/* Glassmorphism Card Base */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Responsive Typography */
@media (max-width: 768px) {
    html { font-size: 14px; }
    h1 { font-size: var(--font-size-4xl); }
    h2 { font-size: var(--font-size-3xl); }
    h3 { font-size: var(--font-size-2xl); }
}

@media (max-width: 480px) {
    html { font-size: 13px; }
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    body { background: white; color: black; }
    .no-print { display: none; }
}

/* ===================================
   Additional Animations
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
