* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #e7ecff;
    --secondary-color: #7209b7;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    
    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f3f9;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    --border-color: #e1e5eb;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    
    --font-family: 'Cairo', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
}

[data-theme="dark"] {
    --primary-color: #5a7dff;
    --primary-dark: #4a6bff;
    --primary-light: rgba(90, 125, 255, 0.15);
    --secondary-color: #9d4edd;
    
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-light: #95a5a6;
    
    --bg-body: #121826;
    --bg-surface: #1a2035;
    --bg-card: #1e2538;
    --bg-hover: #252d45;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);
    
    --border-color: #2a3149;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: var(--font-size-2xl);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-md);
}

.theme-toggle-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.theme-toggle-btn i {
    position: absolute;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.theme-toggle-btn .fa-sun {
    opacity: 1;
    transform: scale(1);
}

.theme-toggle-btn .fa-moon {
    opacity: 0;
    transform: scale(0.5);
}

[data-theme="dark"] .theme-toggle-btn .fa-sun {
    opacity: 0;
    transform: scale(0.5);
}

[data-theme="dark"] .theme-toggle-btn .fa-moon {
    opacity: 1;
    transform: scale(1);
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.modern-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0 6rem;
    border-radius: 0 0 40px 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-text h1 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.2;
}

.logo-text p {
    font-size: var(--font-size-md);
    opacity: 0.9;
    font-weight: 500;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-top: 5px;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,128C672,107,768,117,864,138.7C960,160,1056,192,1152,192C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
}

.wave-1 {
    opacity: 0.5;
    animation: wave-animation 25s linear infinite;
}

.wave-2 {
    opacity: 0.3;
    animation: wave-animation 20s linear infinite reverse;
    height: 80px;
}

.wave-3 {
    opacity: 0.1;
    animation: wave-animation 15s linear infinite;
    height: 60px;
}

@keyframes wave-animation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.main-content {
    padding-bottom: 4rem;
}

.control-section {
    margin-bottom: 3rem;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.control-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.control-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.control-content {
    flex: 1;
}

.control-content label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: var(--font-size-md);
}

.select-container {
    position: relative;
}

.modern-select {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    transition: all var(--transition-normal);
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.select-arrow {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.subjects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.subject-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.subject-title {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    margin-left: 10px;
}

.subject-coef {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 700;
    white-space: nowrap;
}

.inputs-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 120px;
}

.input-group label {
    display: block;
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.mark-input {
    width: 100%;
    padding: 10px 15px;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    color: var(--text-primary);
    text-align: center;
    transition: all var(--transition-normal);
}

.mark-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    height: 100%;
}

.result-card.primary {
    border-top: 5px solid var(--primary-color);
}

.result-card.secondary {
    border-top: 5px solid var(--secondary-color);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-header h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.result-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.result-card.secondary .result-icon {
    background: rgba(114, 9, 183, 0.1);
    color: var(--secondary-color);
}

.score-display {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.score-circle {
    width: 180px;
    height: 180px;
    background: var(--bg-surface);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.score-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    z-index: 1;
}

.score-value {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--primary-color);
    z-index: 2;
    line-height: 1;
}

.score-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: 5px;
    z-index: 2;
}

.status-message {
    background: var(--bg-surface);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid var(--info-color);
}

.status-message i {
    color: var(--info-color);
    font-size: 1.2rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.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-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--font-size-lg);
}

.annual-input-container {
    margin: 1.5rem 0;
}

.annual-input-container .input-group {
    margin-bottom: 1rem;
}

.annual-input-container .input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.modern-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.annual-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    border: 2px solid var(--border-color);
}

.result-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.final-score {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--success-color);
}

.result-hint {
    background: var(--bg-surface);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed var(--border-color);
}

.result-hint i {
    color: var(--warning-color);
}

.info-section {
    margin-top: 4rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.info-card h4 {
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-md);
    line-height: 1.6;
}

.print-section {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.print-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.print-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.print-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

.print-logo h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.print-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid #dee2e6;
}

.info-row {
    display: flex;
    margin-bottom: 0.5rem;
}

.info-row .label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
    text-align: left;
}

.info-row .value {
    color: #212529;
    font-weight: 500;
}

.print-table-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.print-table th {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #dee2e6;
    font-weight: 600;
}

.print-table td {
    padding: 0.6rem;
    text-align: center;
    border: 1px solid #dee2e6;
}

.print-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.print-table tbody tr:hover {
    background-color: #e9ecef;
}

.print-table tfoot tr {
    background-color: #f1f3f9;
    font-weight: 600;
}

.total-row td {
    font-size: 1rem;
}

.gpa-row td {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.status-row td {
    font-size: 1rem;
    font-weight: 700;
}

.text-end {
    text-align: right !important;
    padding-right: 1rem !important;
}

.print-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.print-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.print-date p {
    margin: 0.25rem 0;
}

.print-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn-print {
    background: #4361ee;
    color: white;
}

.btn-print:hover {
    background: #3a56d4;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .print-section,
    .print-section * {
        visibility: visible;
    }
    
    .print-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        padding: 0;
        background: white;
    }
    
    .print-container {
        box-shadow: none;
        padding: 1rem;
        margin: 0;
    }
    
    .print-actions {
        display: none !important;
    }
    
    .print-table th {
        background: #4361ee !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .print-table tbody tr:nth-child(even) {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .print-table tfoot tr {
        background-color: #f1f3f9 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

[data-theme="dark"] .print-container {
    background: white !important;
    color: #212529 !important;
}

[data-theme="dark"] .print-table th {
    background: #4361ee !important;
    color: white !important;
}

[data-theme="dark"] .print-table tbody tr:nth-child(even) {
    background-color: #f8f9fa !important;
}

[data-theme="dark"] .print-table tfoot tr {
    background-color: #f1f3f9 !important;
}

[data-theme="dark"] .print-info {
    background: #f8f9fa !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: var(--font-size-md);
}

.modern-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.footer-info {
    text-align: center;
    flex: 1;
}

.footer-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-link i {
    font-size: 1.1rem;
}

@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .header-stats {
        justify-content: center;
    }
    
    .results-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modern-header {
        padding: 3rem 0 5rem;
    }
    
    .logo-text h1 {
        font-size: var(--font-size-2xl);
    }
    
    .control-grid,
    .subjects-container,
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .theme-toggle-container {
        top: 10px;
        left: 10px;
    }
    
    .theme-toggle-btn {
        width: 45px;
        height: 45px;
    }
    
    .print-container {
        padding: 1rem;
    }
    
    .print-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .print-table {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .subject-card,
    .result-card,
    .control-card,
    .info-card {
        padding: 1.25rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-value {
        font-size: var(--font-size-3xl);
    }
    
    .print-actions {
        flex-direction: column;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 0.5s ease;
}