/* Modern Design Enhancements - Enhanced Stylesheet */

/* ============================================
   GLOBAL ENHANCEMENTS
   ============================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* ============================================
   TYPOGRAPHY ENHANCEMENTS
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.card,
[class*="card"],
[class*="Card"] {
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 
                0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.card:hover,
[class*="card"]:hover,
[class*="Card"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 
                0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

.dark .card,
.dark [class*="card"],
.dark [class*="Card"] {
    background: rgba(20, 20, 20, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 
                0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================
   BUTTONS
   ============================================ */

button,
[role="button"],
[class*="button"],
[class*="Button"],
.btn {
    border-radius: 12px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative;
    overflow: hidden;
}

button::before,
[role="button"]::before,
[class*="button"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
[role="button"]:hover::before,
[class*="button"]:hover::before {
    width: 300px;
    height: 300px;
}

button:hover,
[role="button"]:hover,
[class*="button"]:hover,
.btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

button:active,
[role="button"]:active,
[class*="button"]:active,
.btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

button:focus-visible,
[role="button"]:focus-visible,
[class*="button"]:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

/* Primary Button */
button[class*="primary"],
[class*="Primary"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

/* Secondary Button */
button[class*="secondary"],
[class*="Secondary"] {
    background: rgba(0, 0, 0, 0.05) !important;
    color: inherit !important;
}

.dark button[class*="secondary"],
.dark [class*="Secondary"] {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   INPUTS & FORMS
   ============================================ */

input,
textarea,
select {
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    transform: translateY(-1px) !important;
}

.dark input,
.dark textarea,
.dark select {
    background: rgba(20, 20, 20, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: #667eea !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    color: #764ba2 !important;
}

/* ============================================
   TABLES
   ============================================ */

table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

th {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.875rem !important;
    letter-spacing: 0.05em !important;
    padding: 1rem !important;
}

td {
    padding: 1rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

tr:hover {
    background: rgba(102, 126, 234, 0.05) !important;
    transition: background 0.2s ease !important;
}

.dark th {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    color: white !important;
}

.dark tr:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

/* ============================================
   BADGES & TAGS
   ============================================ */

.badge,
[class*="badge"],
[class*="Badge"],
[class*="tag"],
[class*="Tag"] {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.025em !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3) !important;
}

/* ============================================
   MODALS & DIALOGS
   ============================================ */

[role="dialog"],
[class*="modal"],
[class*="Modal"],
[class*="dialog"],
[class*="Dialog"] {
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    animation: modalFadeIn 0.3s ease-out !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   LOADING STATES
   ============================================ */

[class*="loading"],
[class*="Loading"],
[class*="spinner"],
[class*="Spinner"] {
    animation: spin 1s linear infinite !important;
}

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

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    background-clip: padding-box;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[class*="animate"],
[class*="fade"],
[class*="slide"] {
    animation: fadeIn 0.5s ease-out !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.glass-effect {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-modern {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07),
                0 10px 15px rgba(0, 0, 0, 0.1),
                0 20px 25px rgba(0, 0, 0, 0.05) !important;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.hover-lift:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */

@media (max-width: 768px) {
    .card,
    [class*="card"],
    [class*="Card"] {
        border-radius: 12px !important;
    }
    
    button,
    [role="button"],
    [class*="button"] {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
    
    input,
    textarea,
    select {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

:focus-visible {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

::selection {
    background: rgba(102, 126, 234, 0.3) !important;
    color: inherit !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .card,
    button,
    [class*="card"],
    [class*="button"] {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}
