/* Main CSS - Non-critical styles */

/* Additional animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Enhanced hover effects */
.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.2);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Status messages */
.status-message {
    text-align: center;
    padding: 2rem;
}

.status-message h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.status-message p {
    color: var(--light-gray);
    margin-bottom: 0.5rem;
}

/* Enhanced form elements */
input[type="file"] {
    display: none;
}

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

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Selection styles */
::selection {
    background: var(--primary);
    color: var(--dark);
}

::-moz-selection {
    background: var(--primary);
    color: var(--dark);
}

/* Focus styles */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Disabled states */
button:disabled,
input:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error states */
.error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2) !important;
}

.error-message {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Success states */
.success {
    border-color: #44ff44 !important;
    box-shadow: 0 0 0 2px rgba(68, 255, 68, 0.2) !important;
}

.success-message {
    color: #44ff44;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--dark);
    color: var(--light);
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--primary);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .tool-container {
        border: 1px solid #ccc !important;
        background: white !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #ffff00;
        --secondary: #ffffff;
        --dark: #000000;
        --light: #ffffff;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark: #0a0a0a;
        --light: #ffffff;
        --gray: #333333;
        --light-gray: #cccccc;
    }
}

/* Light mode support */
@media (prefers-color-scheme: light) {
    :root {
        --dark: #ffffff;
        --light: #000000;
        --gray: #cccccc;
        --light-gray: #666666;
    }
}

/* Additional utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

.shadow { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.shadow-xl { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); }