/* ============================================================================
   CSS STYLES FOR CGPA/SGPA CALCULATOR WEBSITE
   ============================================================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Scheme */
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Neutral Colors */
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --card-bg: #ffffff;
    --text-dark: #111827;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    
    /* Grade Colors */
    --grade-o: #10b981;
    --grade-a: #3b82f6;
    --grade-b: #8b5cf6;
    --grade-c: #f59e0b;
    --grade-f: #ef4444;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding-bottom: var(--spacing-xl);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Gradient */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================================================
   FLOATING STUDY ELEMENTS ANIMATION
   ============================================================================ */

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.float-item {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.15);
    animation: float 20s infinite ease-in-out;
}

.float-item.book {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.float-item.pencil {
    top: 70%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.float-item.graduation {
    top: 30%;
    left: 85%;
    animation-delay: 4s;
    animation-duration: 20s;
}

.float-item.lightbulb {
    top: 50%;
    left: 15%;
    animation-delay: 1s;
    animation-duration: 19s;
}

.float-item.star {
    top: 80%;
    left: 25%;
    animation-delay: 3s;
    animation-duration: 21s;
}

.float-item.atom {
    top: 20%;
    left: 50%;
    animation-delay: 5s;
    animation-duration: 17s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-60px) rotate(-5deg);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-30px) rotate(3deg);
        opacity: 0.2;
    }
}

/* ============================================================================
   HEADER STYLES
   ============================================================================ */

header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
    border-bottom: 4px solid #fbbf24;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.logo-container {
    animation: logoEntry 1s ease-out;
}

.college-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    animation: logoPulse 3s ease-in-out infinite;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes logoEntry {
    from {
        opacity: 0;
        transform: translateY(-50px) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.animated-title {
    animation: titleSlide 1s ease-out;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleSlide 1s ease-out, shimmer 3s linear infinite;
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.college-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: var(--spacing-xs);
    animation: fadeInUp 1.2s ease-out;
    letter-spacing: 1px;
    text-transform: uppercase;
}

header .tagline {
    font-size: 1.1rem;
    color: #d1d5db;
    font-weight: 300;
    animation: fadeInUp 1.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

main {
    margin-top: var(--spacing-lg);
}

/* Tab Navigation */
.tab-container {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.tab-button {
    flex: 1;
    min-width: 150px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.tab-button.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-3px);
    animation: tabPulse 2s ease-in-out infinite;
}

@keyframes tabPulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6);
    }
}

/* Calculator Sections */
.calculator-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.calculator-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 10;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    animation: cardEntry 0.6s ease-out;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: #fbbf24;
    transform: translateY(-5px);
}

.card h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width 0.4s ease;
}

.card:hover h2::after {
    width: 100%;
}

.card .description {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

/* ============================================================================
   FORM STYLES
   ============================================================================ */

.input-group {
    margin-bottom: var(--spacing-lg);
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-sm);
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: scale(1.02);
    animation: inputGlow 1.5s ease-in-out infinite;
}

@keyframes inputGlow {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.2);
    }
}

input[type="number"]:invalid {
    border-color: var(--danger-color);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Subject and Semester Fields */
#subjects-container,
#semesters-container {
    margin: var(--spacing-lg) 0;
}

.subject-row,
.semester-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: var(--spacing-md);
    align-items: end;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--light-bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.5s ease-out;
    transition: all 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.subject-row:hover,
.semester-row:hover {
    background: #e0f2fe;
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-left-width: 6px;
}

.semester-row {
    grid-template-columns: 150px 1fr;
}

.subject-row label,
.semester-row label {
    margin-bottom: var(--spacing-xs);
}

/* Button Styles */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1.1rem;
    margin-top: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.btn-success::before {
    content: '🎯';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.4s ease;
}

.btn-success:hover::before {
    left: 20px;
    opacity: 1;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    padding-left: 60px;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================================================
   RESULT STYLES
   ============================================================================ */

.result-card {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: var(--shadow-xl);
    display: none;
    animation: slideIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '⭐';
    position: absolute;
    top: -50px;
    right: -50px;
    font-size: 10rem;
    opacity: 0.1;
    animation: rotateStar 10s linear infinite;
}

@keyframes rotateStar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-card.show {
    display: block;
    animation: slideIn 0.8s ease, resultGlow 2s ease-in-out infinite;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes resultGlow {
    0%, 100% {
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 20px 60px rgba(102, 126, 234, 0.6);
    }
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: var(--spacing-sm);
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin: var(--spacing-lg) 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: countUp 1s ease-out, numberPulse 2s ease-in-out infinite;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes numberPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.result-table {
    width: 100%;
    margin: var(--spacing-md) 0;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.result-table th {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.1);
}

.result-summary {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
}

.performance-message {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

/* ============================================================================
   SUGGESTIONS AND RECOMMENDATIONS STYLES
   ============================================================================ */

.suggestions-container {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    color: var(--text-dark);
    animation: slideIn 0.8s ease;
}

.suggestions-container h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-sm);
}

.suggestion-section {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    animation: fadeInUp 1s ease;
}

.suggestion-section.excellent {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left-color: #10b981;
}

.suggestion-section.good {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #3b82f6;
}

.suggestion-section.average {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
}

.suggestion-section.needs-improvement {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left-color: #f97316;
}

.suggestion-section.critical {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #ef4444;
}

.suggestion-section.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-left-color: #dc2626;
    border-width: 6px;
}

.suggestion-section.general-tips {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-left-color: #8b5cf6;
    margin-top: var(--spacing-lg);
}

.performance-badge {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
    width: 100%;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.performance-badge.outstanding {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.performance-badge.excellent {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.performance-badge.good {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.performance-badge.satisfactory {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.performance-badge.average-low {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.performance-badge.poor {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    animation: criticalPulse 1s ease-in-out infinite;
}

@keyframes criticalPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(220, 38, 38, 0.6);
    }
}

.suggestion-category {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.suggestion-category:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.suggestion-category.warning {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

.suggestion-category.critical {
    background: #fee2e2;
    border: 2px solid #ef4444;
}

.suggestion-category.danger {
    background: #fecaca;
    border: 3px solid #dc2626;
    animation: dangerBlink 2s ease-in-out infinite;
}

@keyframes dangerBlink {
    0%, 100% {
        border-color: #dc2626;
    }
    50% {
        border-color: #991b1b;
    }
}

.suggestion-category h5 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.suggestion-category.warning h5,
.suggestion-category.critical h5,
.suggestion-category.danger h5 {
    color: #dc2626;
    font-weight: 700;
}

.suggestion-category ul {
    margin-left: var(--spacing-lg);
    line-height: 1.8;
}

.suggestion-category li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
    position: relative;
}

.suggestion-category li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.suggestion-category li strong {
    color: #dc2626;
    font-weight: 700;
}

.suggestion-category ul ul {
    margin-left: var(--spacing-md);
    margin-top: var(--spacing-xs);
}

/* Responsive Suggestions */
@media (max-width: 768px) {
    .suggestions-container {
        padding: var(--spacing-md);
    }
    
    .suggestions-container h4 {
        font-size: 1.2rem;
    }
    
    .suggestion-category {
        padding: var(--spacing-sm);
    }
    
    .suggestion-category ul {
        margin-left: var(--spacing-md);
    }
    
    .performance-badge {
        font-size: 1rem;
    }
}

/* ============================================================================
   ABOUT SECTION STYLES
   ============================================================================ */

.info-section {
    margin-bottom: var(--spacing-xl);
}

.info-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-sm);
}

.credits-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing-sm) 0 0 0;
    display: grid;
    gap: var(--spacing-sm);
}

.credit-line {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.75));
    border-radius: var(--radius-md);
    border-left: 4px solid #fbbf24;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    animation: creditsGlow 3s ease-in-out infinite;
}

.credit-role {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.credit-name {
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #111827;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: nameShimmer 4s linear infinite;
}

.credits-block {
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid #fbbf24;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    animation: creditsGlow 3s ease-in-out infinite;
}

.credit-role-single {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.credits-names {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--spacing-xs);
}

.credit-name-line {
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #111827;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: nameShimmer 4s linear infinite;
    font-size: 1.05rem;
}

@keyframes creditsGlow {
    0%, 100% { box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
    50% { box-shadow: 0 12px 30px rgba(251, 191, 36, 0.35); }
}

@keyframes nameShimmer {
    to { background-position: 200% center; }
}

/* Grade Table */
.grade-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
}

.grade-table thead {
    background: var(--primary-color);
    color: white;
}

.grade-table th,
.grade-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.grade-table tbody tr:hover {
    background: var(--light-bg);
}

.grade-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: white;
}

.grade-o { background: var(--grade-o); }
.grade-aplus { background: var(--grade-a); }
.grade-a { background: #6366f1; }
.grade-bplus { background: var(--grade-b); }
.grade-b { background: #a855f7; }
.grade-c { background: var(--grade-c); }
.grade-f { background: var(--grade-f); }

/* Formula Boxes */
.formula-box {
    background: var(--light-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--info-color);
}

.formula-box h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    background: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    margin: var(--spacing-sm) 0;
    font-weight: 600;
    color: var(--primary-color);
}

.formula-desc {
    color: var(--text-light);
    margin: var(--spacing-sm) 0;
}

.example {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-sm);
    border-left: 3px solid var(--secondary-color);
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    background: var(--light-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--secondary-color);
}

/* ============================================================================
   FOOTER STYLES
   ============================================================================ */

footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    position: relative;
    z-index: 10;
    border-top: 4px solid #fbbf24;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex-direction: column;
}

.footer-logo {
    font-size: 3rem;
    color: #fbbf24;
    animation: footerIconBounce 2s ease-in-out infinite;
}

@keyframes footerIconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.footer-text {
    text-align: center;
}

footer p {
    margin: var(--spacing-xs) 0;
    color: #d1d5db;
    animation: fadeIn 2s ease-out;
}

.footer-quote {
    font-style: italic;
    color: #fbbf24;
    font-weight: 500;
    margin-top: var(--spacing-sm);
    animation: fadeIn 2.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* -------------------------------------------------------------------------
   Modern Glass / Neo Look + Animations
   ------------------------------------------------------------------------- */
:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.card, .result-card, .chart-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    border-radius: 18px;
}

.calculator-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-section .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.subject-row, .semester-row {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0.85rem;
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.btn-animated {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
}

.btn-animated::after {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.25), transparent 50%);
    opacity: 0;
    animation: pulseGlow 2.2s infinite;
}

@keyframes pulseGlow {
    0% { opacity: 0; transform: scale(0.7); }
    50% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.2); }
}

.result-card.show {
    animation: resultPop 0.8s ease;
}

@keyframes resultPop {
    0% { opacity: 0; transform: translateY(14px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.metric-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 20px;
    flex-wrap: wrap;
}

.metric-label {
    font-weight: 600;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-value {
    font-weight: 700;
    color: #fbbf24;
    min-width: 80px;
}

.progress-shell {
    flex: 1;
    height: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #10b981, #f59e0b);
    box-shadow: 0 0 12px rgba(79,70,229,0.45);
    transition: width 0.9s ease;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.chart-card h4 {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card canvas {
    width: 100% !important;
    height: 260px !important;
}

.warning-text {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fecdd3;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 10px 0;
}

.result-value.pop {
    animation: numberPulse 1.1s ease;
}

.gradient-heading {
    background: linear-gradient(90deg, #4f46e5, #10b981, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.fab-container {
    position: fixed;
    bottom: 20px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1200;
}

.fab {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    color: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}

.loader-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 1500;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255,255,255,0.2);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 12px;
    color: #fff;
    font-weight: 600;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1100;
}

.grade-badge {
    position: relative;
}

.grade-badge:hover::after {
    content: attr(title);
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

@media (max-width: 640px) {
    .metric-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .metric-value {
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .header-text {
        text-align: center;
    }
    
    .college-logo {
        width: 80px;
        height: 80px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .college-name {
        font-size: 1rem;
    }
    
    header .tagline {
        font-size: 0.9rem;
    }
    
    .tab-container {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
    }
    
    .subject-row,
    .semester-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .grade-table,
    .result-table {
        font-size: 0.9rem;
    }
    
    .grade-table th,
    .grade-table td,
    .result-table th,
    .result-table td {
        padding: var(--spacing-xs);
    }
    
    .float-item {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .result-value {
        font-size: 1.8rem;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    header,
    footer,
    .tab-container,
    .btn {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
