/* ============================================
   GiftOnScreen - Base Styles
   ============================================ */

/* CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    /* Colors */
    --color-bg-primary: #030014;
    --color-bg-secondary: #0a0a1a;
    --color-bg-card: rgba(255, 255, 255, 0.03);
    --color-bg-card-hover: rgba(255, 255, 255, 0.06);

    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-muted: rgba(255, 255, 255, 0.5);

    --color-accent-purple: #a855f7;
    --color-accent-blue: #3b82f6;
    --color-accent-pink: #ec4899;
    --color-accent-cyan: #06b6d4;

    --gradient-primary: linear-gradient(135deg, #a855f7, #3b82f6, #ec4899);
    --gradient-hero: linear-gradient(180deg, rgba(168, 85, 247, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.05) 100%);

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;
    --space-12: 96px;
    --space-16: 128px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow-purple: 0 0 60px rgba(168, 85, 247, 0.3);
    --shadow-glow-blue: 0 0 60px rgba(59, 130, 246, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Selection */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: var(--color-text-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent-purple), var(--color-accent-blue));
    border-radius: var(--radius-full);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 60px rgba(168, 85, 247, 0.5);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

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

.btn-secondary:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-accent-purple);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-2);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.form-input.error,
.form-textarea.error {
    border-color: #ef4444;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.field-error {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: var(--space-1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 0, 20, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--color-accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--color-text-secondary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: var(--space-3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--color-text-primary);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-2);
    }

    .btn {
        padding: var(--space-2) var(--space-3);
        font-size: 0.9rem;
    }
}