/* Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Transitions */
a, button {
    transition: all 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dark mode scrollbar */
body.dark-mode::-webkit-scrollbar-track {
    background: #1f2937;
}

body.dark-mode::-webkit-scrollbar-thumb {
    background: #4b5563;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Utility classes */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Slide transition */
.slide-enter-active, .slide-leave-active {
    transition: all 0.3s ease;
}

.slide-enter-from {
    transform: translateY(-100%);
    opacity: 0;
}

.slide-leave-to {
    transform: translateY(-100%);
    opacity: 0;
}

/* Button hover effects */
button:active:not(:disabled) {
    transform: scale(0.95);
}

/* Focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Code highlighting */
code {
    font-family: 'Courier New', Courier, monospace;
}

pre {
    overflow-x: auto;
}

/* Table styling */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: bold;
    background-color: #f5f5f5;
}

tr:hover {
    background-color: #fafafa;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    font-size: 1rem;
}

/* Button states */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
    
    body {
        background: white;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
