@import "tailwindcss";

@theme {
    --font-sans: "Inter", sans-serif;
    --font-plus: "Plus Jakarta Sans", sans-serif;
}

body {
    font-family: var(--font-sans);
}

/* 2. Security: Prevent Selection in Exam Area */
.no-select {
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

/* 3. Custom Scrollbar for Sidebar */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 4. Loader Animation */
.loader {
    border-top-color: #3498db;
    -webkit-animation: spinner 1.5s linear infinite;
    animation: spinner 1.5s linear infinite;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 5. Background Patterns */
.hero-pattern {
    background-image: radial-gradient(#3b82f6 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    opacity: 0.1;
}

.grid-pattern {
    background-image: linear-gradient(to right, #f1f5f9 1px, transparent 1px),
        linear-gradient(to bottom, #f1f5f9 1px, transparent 1px);
    background-size: 40px 40px;
}

/* 6. Question Content Tables - Using !important to override Tailwind */
.prose table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 1rem 0 !important;
    font-size: 0.95em !important;
    display: table !important;
}

.prose table th,
.prose table td {
    border: 1px solid #e2e8f0 !important;
    padding: 0.75rem !important;
    text-align: left !important;
    display: table-cell !important;
}

.prose table th {
    background-color: #f8fafc !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.prose table tr {
    display: table-row !important;
}

.prose table tr:nth-child(even) {
    background-color: #f8fafc !important;
}

.prose table tr:hover {
    background-color: #f1f5f9 !important;
}

.prose table thead {
    display: table-header-group !important;
}

.prose table tbody {
    display: table-row-group !important;
}

/* Horizontal scroll for wide tables */
.prose {
    overflow-x: auto !important;
}

/* 8. Image Scaling for Questions/Answers */
.prose img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 500px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 1.5rem auto !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
}

/* 7. Custom Animations */
@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.animate-bounce-subtle {
    animation: bounce-subtle 2s infinite ease-in-out;
}