/* Custom styles for Final Grade Calculator */

/* Custom select arrow */
.custom-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.custom-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239333EA' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Preset tabs active state */
.preset-tab.active {
    background-color: white;
    color: #9333EA;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.preset-tab:not(.active) {
    color: #6B7280;
}

/* Grade item hover effects */
.grade-item-container {
    transition: all 0.3s ease;
}

.grade-item-container:hover {
    transform: translateX(4px);
}

/* Result value gradient text */
.gradient-text-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-yellow {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-red {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-gray {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-purple {
    background: linear-gradient(135deg, #9333EA 0%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Difficulty meter gradient */
.difficulty-fill-gradient {
    background: linear-gradient(90deg, #10B981 0%, #F59E0B 50%, #EF4444 100%);
}

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

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

/* Print styles */
@media print {
    body {
        background: white !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .print-break-inside-avoid {
        break-inside: avoid;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9333EA;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7C3AED;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #9333EA;
    outline-offset: 2px;
}

/* Remove spinner from number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding: 0.5rem;
    }
    
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 50;
    margin-bottom: 0.5rem;
}

/* Button ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Pulse animation for important elements */
@keyframes pulse-border {
    0%, 100% {
        border-color: #9333EA;
    }
    50% {
        border-color: #EC4899;
    }
}

.pulse-border {
    animation: pulse-border 2s infinite;
}