/**
 * FileRack Website Launcher - Main Styles
 * Custom styles for the FileRack system
 */

/* Global Styles */
:root {
    --primary-color: #2563EB;
    --success-color: #059669;
    --danger-color: #DC2626;
    --warning-color: #D97706;
    --info-color: #0EA5E9;
    --light-gray: #F8FAFC;
    --medium-gray: #64748B;
    --dark-gray: #1E293B;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
}

/* Custom button styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.text-purple {
    color: #7C3AED !important;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="25" cy="75" r="0.5" fill="white" opacity="0.1"/><circle cx="75" cy="25" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Feature cards */
.features-section .card {
    transition: all 0.3s ease;
    border: none;
}

.features-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

/* Statistics section */
.stats-section {
    background: white;
}

.stat-item {
    padding: 2rem 1rem;
}

/* Service tiles */
.service-tile {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.service-tile:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

/* Sortable styles */
.sortable-ghost {
    opacity: 0.5;
    transform: rotate(2deg);
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
}

/* Form improvements */
.form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group-text {
    background-color: #f8fafc;
    border-color: #d1d5db;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }

    .hero-section .display-4 {
        font-size: 2rem;
    }

    .service-grid {
        padding: 0.5rem;
        gap: 1rem;
    }

    .service-tile {
        padding: 1rem;
        min-height: 120px;
    }

    .category-tabs {
        padding: 0.5rem;
    }

    .category-tab {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }

    .bg-white {
        background-color: #1e293b !important;
        color: #e2e8f0;
    }

    .service-tile {
        background-color: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }

    .modal-content {
        background-color: #1e293b;
        color: #e2e8f0;
    }

    .form-control {
        background-color: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }

    .form-control:focus {
        background-color: #334155;
        border-color: var(--primary-color);
    }
}

/* Print styles */
@media print {
    .navbar,
    .modal,
    .service-actions,
    .category-tabs .btn {
        display: none !important;
    }

    .service-tile {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.category-tab:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-tile {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}