/* Main CSS - Base styles and layout */

/* CSS Custom Properties for theming */
:root {
    /* Dark theme colors (default) */
    --bg-primary: #0c0c0c;
    --bg-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    --text-primary: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.6);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(0, 0, 0, 0.4);
    --scrollbar-thumb: rgba(255, 255, 255, 0.2);
}

/* Light theme colors */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-gradient: linear-gradient(135deg, #f5f5f5 0%, #f5f5f5 100%);
    --text-primary: #333;
    --border-color: rgba(0, 0, 0, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.15);
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.25);
    --scrollbar-thumb: rgba(0, 0, 0, 0.2);
}

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

html {
    background: var(--bg-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

#container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: inherit;
}

/* Image styling */
img {
    transition: box-shadow 0.3s ease, border 0.3s ease;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

/* Loading animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Shake animation for overlap prevention */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Utility classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Focus styles for accessibility */
button:focus-visible,
.focusable:focus-visible {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
