/* Advanced Marks Distribution System Styles */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --warning-gradient: linear-gradient(135deg, #f39c12 0%, #f7dc6f 100%);
    --danger-gradient: linear-gradient(135deg, #e74c3c 0%, #f1948a 100%);
    --info-gradient: linear-gradient(135deg, #3498db 0%, #85c1e9 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
}

/* Glass Morphism Effects */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Advanced Form Styling */
.form-floating-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating-modern .form-control {
    height: 60px;
    padding: 20px 15px 5px 15px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-floating-modern .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    background: white;
}

.form-floating-modern label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 5px;
}

.form-floating-modern .form-control:focus + label,
.form-floating-modern .form-control:not(:placeholder-shown) + label {
    top: 10px;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    transform: translateY(0);
}

/* Interactive Progress Ring */
.progress-ring-container {
    position: relative;
    display: inline-block;
    margin: 20px 0;
}

.progress-ring {
    transform: rotate(-90deg);
    transition: all 0.5s ease;
}

.progress-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease, stroke 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: bold;
    color: #667eea;
}

/* Animated Cards */
.animated-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.animated-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Modern Buttons */
.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Floating Labels Animation */
@keyframes float-label {
    0% {
        transform: translateY(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }
}

.floating-label {
    animation: float-label 2s ease-in-out infinite;
}

/* Data Visualization */
.marks-chart {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.chart-bar {
    height: 20px;
    border-radius: 10px;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.chart-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.chart-fill.cq {
    background: var(--primary-gradient);
}

.chart-fill.mcq {
    background: var(--success-gradient);
}

.chart-fill.practical {
    background: var(--warning-gradient);
}

.chart-fill.assignment {
    background: var(--info-gradient);
}

.chart-fill.attendance {
    background: var(--danger-gradient);
}

/* Interactive Table */
.interactive-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.interactive-table thead th {
    background: var(--primary-gradient);
    color: white;
    padding: 20px 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    position: relative;
}

.interactive-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.interactive-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.interactive-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.interactive-table tbody td {
    padding: 15px;
    vertical-align: middle;
    border: none;
}

/* Status Badges */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin: 2px;
}

.status-badge.active {
    background: var(--success-gradient);
    color: white;
}

.status-badge.inactive {
    background: var(--danger-gradient);
    color: white;
}

.status-badge.pending {
    background: var(--warning-gradient);
    color: white;
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #56ab2f;
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification.warning {
    border-left: 4px solid #f39c12;
}

.notification.info {
    border-left: 4px solid #3498db;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-floating-modern .form-control {
        height: 50px;
        padding: 15px 10px 5px 10px;
    }
    
    .btn-gradient {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .interactive-table {
        font-size: 14px;
    }
    
    .interactive-table thead th,
    .interactive-table tbody td {
        padding: 10px 8px;
    }
    
    .progress-ring {
        width: 100px;
        height: 100px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.25);
        --glass-border: rgba(255, 255, 255, 0.18);
    }
    
    .form-control {
        background: rgba(0, 0, 0, 0.1);
        color: white;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .form-control:focus {
        background: rgba(0, 0, 0, 0.2);
    }
    
    .interactive-table {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .interactive-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Print Styles */
@media print {
    .btn-gradient,
    .floating-action-btn,
    .notification {
        display: none !important;
    }
    
    .interactive-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .animated-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .progress-ring {
        display: none;
    }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .btn-gradient {
        border: 2px solid white;
    }
    
    .interactive-table thead th {
        border: 2px solid white;
    }
}