/* ==========================================================================
   Ponpon Modern CSS Framework
   ========================================================================== */

/* CSS Variables for consistent theming */
:root {
    /* Primary Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-bg-dark: rgba(0, 0, 0, 0.25);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    /* Text Colors */
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --text-white: #ffffff;
    /* Background Colors */
    --bg-primary: #f7fafc;
    --bg-secondary: #edf2f7;
    --bg-white: #ffffff;
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50px;
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-normal);
}

    a:hover {
        text-decoration: none;
    }

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Glass Morphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
}

.glass-dark {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border-dark);
}

/* Gradients */
.gradient-primary {
    background: var(--primary-gradient);
}

.gradient-secondary {
    background: var(--secondary-gradient);
}

.gradient-success {
    background: var(--success-gradient);
}

.gradient-warning {
    background: var(--warning-gradient);
}

.gradient-danger {
    background: var(--danger-gradient);
}

/* Text Gradients */
.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shadows */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.shadow-2xl {
    box-shadow: var(--shadow-2xl);
}

/* Border Radius */
.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: var(--radius-2xl);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* Flexbox Utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-start {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.flex-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ==========================================================================
   Modern Components
   ========================================================================== */

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

    .btn-modern:hover {
        transform: translateY(-2px);
        text-decoration: none;
    }

    .btn-modern:active {
        transform: translateY(0);
    }

    .btn-modern.btn-primary {
        background: var(--primary-gradient);
        color: white;
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    }

        .btn-modern.btn-primary:hover {
            box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
            color: white;
        }

    .btn-modern.btn-secondary {
        background: var(--secondary-gradient);
        color: white;
        box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
    }

        .btn-modern.btn-secondary:hover {
            box-shadow: 0 15px 35px rgba(240, 147, 251, 0.4);
            color: white;
        }

    .btn-modern.btn-outline {
        background: transparent;
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

        .btn-modern.btn-outline:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.5);
            color: white;
        }

/* Modern Cards */
.card-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition-normal);
}

    .card-modern:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-2xl);
    }

/* Modern Form Inputs */
.form-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

    .form-modern input,
    .form-modern select,
    .form-modern textarea {
        width: 100%;
        padding: 1rem 1rem 1rem 3rem;
        border: 2px solid #e2e8f0;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.9);
        font-size: 1rem;
        transition: var(--transition-normal);
    }

        .form-modern input:focus,
        .form-modern select:focus,
        .form-modern textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            background: white;
        }

    .form-modern .form-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #718096;
        z-index: 10;
    }

    .form-modern label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--text-primary);
    }

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.5s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile First Approach */
@media (max-width: 576px) {
    :root {
        --container-padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    .btn-modern {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .card-modern {
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }
}

@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
    }
}

@media (min-width: 992px) {
    :root {
        --container-padding: 3rem;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --glass-bg: rgba(0, 0, 0, 0.25);
        --glass-border: rgba(255, 255, 255, 0.1);
    }

    .card-modern {
        background: rgba(0, 0, 0, 0.3);
        color: white;
    }

    .form-modern input,
    .form-modern select,
    .form-modern textarea {
        background: rgba(0, 0, 0, 0.3);
        color: white;
        border-color: rgba(255, 255, 255, 0.2);
    }

        .form-modern input::placeholder,
        .form-modern select::placeholder,
        .form-modern textarea::placeholder {
            color: rgba(255, 255, 255, 0.6);
        }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .no-print {
        display: none !important;
    }

    a {
        text-decoration: underline;
    }

        a[href]:after {
            content: " (" attr(href) ")";
        }

    img {
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

/* Focus styles for keyboard navigation */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: var(--transition-normal);
}

    .skip-to-main:focus {
        top: 20px;
    }

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.95);
        --glass-border: rgba(0, 0, 0, 0.3);
    }

    .btn-modern {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

/* ==========================================================================
   Selection Styles
   ========================================================================== */

::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}
