/* ========================================
   ApplyAssists - Premium Dark Theme
   Design System Foundation
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

/* 
   ========================================
   1. COLOR VARIABLES
   ======================================== 
*/
html {
    color-scheme: dark;
}

:root {
    /* Dark Theme Colors */
    --color-bg-primary: #0a0e27;
    --color-bg-secondary: #11152e;
    --color-bg-tertiary: #1a1f3a;
    --color-bg-card: rgba(26, 31, 58, 0.6);
    --color-bg-card-hover: rgba(26, 31, 58, 0.8);

    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-bg: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a8c9;
    --color-text-muted: #6b7299;

    /* Accent Colors */
    --color-purple: #667eea;
    --color-pink: #f093fb;
    --color-blue: #4facfe;
    --color-cyan: #00f2fe;

    /* Brand Colors */
    --brand-blue: #2b59d9;
    --brand-teal: #1ac095;
    --brand-i-dot-size: 5px;

    /* Status Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Border & Shadow */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --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: 0 0 20px rgba(102, 126, 234, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* 
   ========================================
   2. BASE / RESET STYLES
   ======================================== 
*/
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* 
   ========================================
   3. TYPOGRAPHY SYSTEM
   ======================================== 
*/
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

.text-gradient {
    color: var(--color-text-primary);
    -webkit-text-fill-color: var(--color-text-primary);
}

.text-gradient-secondary {
    color: var(--color-pink);
    -webkit-text-fill-color: var(--color-pink);
}

@media (min-width: 769px) {
    .text-gradient {
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
    }

    .text-gradient-secondary {
        background: var(--gradient-secondary);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
    }
}

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

.text-muted {
    color: var(--color-text-muted);
}

.brand-wordmark {
    display: inline-block;
    font-family: 'Varela Round', 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--brand-blue);
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

h1.brand-wordmark,
h2.brand-wordmark {
    font-weight: 400;
    font-family: 'Varela Round', 'Nunito', sans-serif;
    line-height: 1.2;
    margin-bottom: 0;
}

.brand-wordmark--sm,
h1.brand-wordmark.brand-wordmark--sm,
h2.brand-wordmark.brand-wordmark--sm {
    font-size: 2rem;
}

.brand-wordmark--md,
h1.brand-wordmark.brand-wordmark--md,
h2.brand-wordmark.brand-wordmark--md {
    font-size: 2.25rem;
}

.brand-wordmark--lg,
h1.brand-wordmark.brand-wordmark--lg,
h2.brand-wordmark.brand-wordmark--lg {
    font-size: 2.5rem;
}

.brand-i {
    position: relative;
    display: inline-block;
}

.brand-i::after {
    content: '';
    position: absolute;
    top: 0.1em;
    left: 50%;
    transform: translateX(-50%);
    width: var(--brand-i-dot-size);
    height: var(--brand-i-dot-size);
    border-radius: 1.5px;
    background-color: var(--brand-teal);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

/* 
   ========================================
   4. COMPONENT CLASSES
   ======================================== 
*/

/* Glassmorphism Cards */
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.glass-card-not-rounded {
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--color-bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.glass-card-solid {
    background: var(--color-bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.card-section-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.card-section-heading h4,
.card-section-heading .h4 {
    margin-bottom: 0;
    line-height: 1;
}

.card-section-heading svg {
    display: block;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.35);
    border-color: rgba(245, 158, 11, 0.7);
    color: #fde68a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--color-purple);
    border: 2px solid var(--color-purple);
}

.btn-outline:hover {
    background: var(--color-purple);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* Inputs & Forms */
.input-group {
    margin-bottom: var(--spacing-md);
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.input::placeholder {
    color: var(--color-text-muted);
}

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

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23a0a8c9' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-purple {
    background: rgba(102, 126, 234, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.badge-pink {
    background: rgba(240, 147, 251, 0.2);
    color: #f093fb;
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.badge-blue {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 
   ========================================
   5. LAYOUT CLASSES
   ======================================== 
*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 
   ========================================
   6. UTILITY CLASSES
   ======================================== 
*/

/* Image Treatments */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-thumbnail {
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.img-glow {
    box-shadow: var(--shadow-glow);
}

/* 
   ========================================
   7. ANIMATIONS
   ======================================== 
*/
@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);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

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

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

/* 
   ========================================
   8. SCROLLBAR STYLING
   ======================================== 
*/
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* 
   ========================================
   9. RESPONSIVE
   ======================================== 
*/
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* 
   ========================================
   10. PRINT STYLES
   ======================================== 
*/
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .glass-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        color: black !important;
    }

    .print\:hidden {
        display: none !important;
    }
}