/* Cosmos Global Styles - Design Polish & Animations */

/* Root Color Variables */
:root {
    --color-primary: #3b82f6;
    --color-secondary: #a855f7;
    --color-accent: #ec4899;
    --color-dark: #0a0a0a;
    --color-gray-800: #1a1a1a;
    --color-gray-700: #2d2d2d;
    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Glass Morphism Base */
.glass-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-button {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3));
    border: 1px solid rgba(168, 85, 247, 0.4);
    position: relative;
    overflow: hidden;
}

.glass-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.glass-button:hover::before {
    left: 100%;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
    }
}

/* Apply animations to elements */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-down {
    animation: slideInDown 0.6s ease-out;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Form Styling */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

input::placeholder,
textarea::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
}

/* Buttons - Enhanced */
button, .glass-button, a.glass-button {
    position: relative;
    cursor: pointer;
}

button:active, .glass-button:active {
    transform: scale(0.98);
}

/* Cards - Hover Effects */
.glass-container {
    position: relative;
}

.glass-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glass-container:hover::after {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .glass-container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Stack buttons vertically on mobile */
    .button-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent)) 1;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.shadow-glow-accent {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

/* Success State */
.success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

/* Error State */
.error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* Warning State */
.warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .glass-container {
        background: white;
        border: 1px solid #ccc;
    }
    
    .glass-button {
        background: white;
        border: 1px solid #ccc;
    }
}

/* Dark Mode (Already default, but explicit) */
html {
    color-scheme: dark;
}
