/* AI Teacher Sidekick - Custom Styles */

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

/* Custom selection color */
::selection {
    background-color: #3b82f6;
    color: white;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Prompt card hover effects */
.prompt-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prompt-card:hover {
    transform: translateY(-2px);
}

/* Favorite button animation */
.favorite-btn .favorite-icon {
    transition: all 0.2s ease;
}

.favorite-btn.active .favorite-icon {
    fill: #ef4444;
    stroke: #ef4444;
}

.favorite-btn:hover .favorite-icon {
    transform: scale(1.1);
}

/* Lock icon pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.prompt-preview .lock-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* Copy button success state */
.copy-success {
    background-color: #10b981 !important;
}

/* Modal backdrop blur */
#email-modal,
#venmo-modal {
    backdrop-filter: blur(4px);
}

/* Toast notification */
#toast {
    z-index: 9999;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* Code/pre styling */
pre {
    font-family: 'SF Mono', Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    line-height: 1.6;
}

code {
    font-family: 'SF Mono', Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grade level badge colors */
.grade-k-2 {
    background-color: #fef3c7;
    color: #92400e;
}

.grade-3-5 {
    background-color: #d1fae5;
    color: #065f46;
}

.grade-6-8 {
    background-color: #dbeafe;
    color: #1e40af;
}

.grade-9-12 {
    background-color: #ede9fe;
    color: #5b21b6;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .prompt-card pre {
        font-size: 0.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }

    .prompt-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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