.donation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.donation-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.donation-modal {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.donation-modal-overlay.show .donation-modal {
    transform: scale(1) translateY(0);
}

.donation-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #FF6B6B 0%, #FFE66D 50%, #4ECDC4 100%);
}

.donation-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.donation-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.donation-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.donation-modal h3 {
    font-size: 1.5rem;
    color: #182848;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.donation-modal p {
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.donation-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.donation-modal-btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.donation-modal-btn.primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.donation-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.5);
}

.donation-modal-btn.secondary {
    background: rgba(0, 0, 0, 0.08);
    color: #666;
}

.donation-modal-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.15);
}

.donation-modal-tip {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1rem;
}

body.dark-mode .donation-modal {
    background: #2a2a3e;
}

body.dark-mode .donation-modal h3 {
    color: #e0e0e0;
}

body.dark-mode .donation-modal p {
    color: #a0a0a0;
}

body.dark-mode .donation-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

body.dark-mode .donation-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

body.spring-festival-theme header {
    background: linear-gradient(135deg, #7a0b0b 0%, #d32f2f 55%, #b71c1c 100%);
}

body.spring-festival-theme header h1,
body.spring-festival-theme header p {
    color: #fff7cc;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

body.spring-festival-theme .header-content {
    position: relative;
}

body.spring-festival-theme .header-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.16), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(255, 215, 0, 0.12), transparent 42%),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.08), transparent 45%);
    pointer-events: none;
    mix-blend-mode: screen;
}

.spring-festival-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    overflow: hidden;
}

.spring-festival-lantern {
    position: absolute;
    top: 12px;
    font-size: 2.2rem;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
    animation: sf-float 3.6s ease-in-out infinite;
}

.spring-festival-lantern.left {
    left: 16px;
    transform-origin: top center;
    animation-delay: 0.2s;
}

.spring-festival-lantern.right {
    right: 16px;
    transform-origin: top center;
    animation-delay: 0.6s;
}

.spring-festival-couplet {
    position: absolute;
    top: 120px;
    width: 38px;
    height: 220px;
    background: linear-gradient(180deg, #b71c1c 0%, #d32f2f 55%, #b71c1c 100%);
    border: 2px solid rgba(255, 215, 0, 0.7);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    font-weight: 800;
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.9;
}

.spring-festival-couplet.left {
    left: 12px;
}

.spring-festival-couplet.right {
    right: 12px;
}

.spring-festival-confetti {
    position: absolute;
    top: -12px;
    left: var(--sf-left, 50%);
    width: var(--sf-size, 8px);
    height: calc(var(--sf-size, 8px) * 1.4);
    background: var(--sf-color, #ffd700);
    border-radius: 2px;
    opacity: 0.9;
    transform: rotate(var(--sf-rot, 0deg));
    animation: sf-fall var(--sf-duration, 6s) linear var(--sf-delay, 0s) infinite;
}

@keyframes sf-float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(10px) rotate(3deg); }
}

@keyframes sf-fall {
    0% { transform: translateY(-20px) rotate(var(--sf-rot, 0deg)); }
    100% { transform: translateY(110vh) rotate(calc(var(--sf-rot, 0deg) + 260deg)); }
}

@media (prefers-reduced-motion: reduce) {
    .spring-festival-lantern,
    .spring-festival-confetti {
        animation: none !important;
    }
}

.announcement-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.announcement-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.announcement-modal {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.announcement-modal-overlay.show .announcement-modal {
    transform: scale(1) translateY(0);
}

.announcement-modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.announcement-modal-header .icon {
    font-size: 2rem;
}

.announcement-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.announcement-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.announcement-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.announcement-modal-content {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
    line-height: 1.8;
    color: #444;
}

.announcement-modal-content h1,
.announcement-modal-content h2,
.announcement-modal-content h3 {
    color: #182848;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.announcement-modal-content h1 { font-size: 1.5rem; }
.announcement-modal-content h2 { font-size: 1.3rem; }
.announcement-modal-content h3 { font-size: 1.1rem; }

.announcement-modal-content p {
    margin-bottom: 0.8rem;
}

.announcement-modal-content ul,
.announcement-modal-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.announcement-modal-content li {
    margin-bottom: 0.4rem;
}

.announcement-modal-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

.announcement-modal-content em {
    color: #888;
    font-style: italic;
}

.announcement-modal-footer {
    padding: 1rem 2rem 1.5rem;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
}

.announcement-modal-btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-modal-btn.primary {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.announcement-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.5);
}

.announcement-modal-btn.secondary {
    background: rgba(0, 0, 0, 0.08);
    color: #666;
}

.announcement-modal-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.15);
}

.announcement-modal-btn.danger {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

.announcement-modal-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.5);
}

.announcement-center-btn {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.announcement-center-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.announcement-center-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.announcement-center-btn .badge.hidden {
    display: none;
}

body.dark-mode .announcement-modal {
    background: #2a2a3e;
}

body.dark-mode .announcement-modal-content {
    color: #a0a0a0;
}

body.dark-mode .announcement-modal-content h1,
body.dark-mode .announcement-modal-content h2,
body.dark-mode .announcement-modal-content h3 {
    color: #e0e0e0;
}

body.dark-mode .announcement-modal-content hr {
    border-top-color: #444;
}

body.dark-mode .announcement-modal-footer {
    border-top-color: #444;
}

body.dark-mode .announcement-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.student-management-container {
    transition: all 0.4s ease;
}

.student-management-container.hidden {
    display: none;
}

.student-management {
    background: white;
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin: 2.5rem 0;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
}

.student-management::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    border-radius: 18px 18px 0 0;
}

.student-management h2 {
    color: #182848;
    margin-bottom: 1.8rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.student-input-section {
    margin-bottom: 2.2rem;
}

.input-group {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.input-group input:focus {
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
    outline: none;
}

.btn {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.4);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(75, 108, 183, 0.6);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    background: linear-gradient(135deg, #cccccc, #999999);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.add {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.btn.import {
    background: linear-gradient(135deg, #9C27B0, #E040FB);
}

.btn.clear {
    background: linear-gradient(135deg, #FF5722, #FF9800);
}

.btn.toggle-students {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    display: block;
    margin: 1.8rem auto;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
}

.btn.feedback {
    background: linear-gradient(135deg, #FF9800, #FFC107);
    display: block;
    margin: 1.2rem auto;
    padding: 1.1rem 2.2rem;
    font-size: 1.15rem;
}

.batch-import,
.file-import {
    margin: 1.3rem 0;
    padding: 1.3rem;
    background: rgba(227, 242, 253, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(179, 219, 255, 0.5);
}

.batch-import h3,
.file-import h3 {
    color: #182848;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.batch-import textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.batch-import textarea:focus {
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
    outline: none;
}

.file-import input {
    width: 100%;
    margin-bottom: 1.2rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.file-import input:focus {
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
    outline: none;
}

.student-list-container {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1.2rem;
    background: rgba(248, 249, 250, 0.9);
    margin-top: 1.5rem;
    backdrop-filter: blur(5px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #4b6cb7 rgba(248, 249, 250, 0.9);
}

.student-list-container::-webkit-scrollbar {
    width: 8px;
}

.student-list-container::-webkit-scrollbar-track {
    background: rgba(248, 249, 250, 0.9);
    border-radius: 4px;
}

.student-list-container::-webkit-scrollbar-thumb {
    background: #4b6cb7;
    border-radius: 4px;
}

.student-list-container::-webkit-scrollbar-thumb:hover {
    background: #3a5795;
}

.empty-list {
    color: #888;
    text-align: center;
    padding: 1rem;
}

.student-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
    transition: all 0.2s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.student-item:hover {
    background: rgba(227, 242, 253, 0.6);
    border-radius: 8px;
}

.student-item:last-child {
    border-bottom: none;
}

.student-info {
    flex: 1;
}

.student-id {
    font-weight: bold;
    color: #4b6cb7;
}

.remove-student {
    background: #ff416c;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.remove-student:hover {
    background: #ff1a4f;
    transform: scale(1.1);
}

.student-summary {
    display: flex;
    justify-content: center;
    gap: 2.2rem;
    margin-top: 1.8rem;
    flex-wrap: wrap;
}

.summary-card {
    background: rgba(227, 242, 253, 0.8);
    border-radius: 14px;
    padding: 1.7rem;
    text-align: center;
    min-width: 160px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(179, 219, 255, 0.5);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.summary-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #182848;
}

.summary-label {
    font-size: 1.1rem;
    color: #555;
    margin-top: 0.5rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Modals */
    .donation-modal, 
    .announcement-modal {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }

    .donation-modal-icon {
        font-size: 3rem;
    }

    .donation-modal h3,
    .announcement-modal h3 {
        font-size: 1.3rem;
    }
    
    .announcement-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .announcement-modal-content {
        padding: 1rem 1.5rem;
    }

    /* Student Management */
    .student-management {
        padding: 1rem;
        margin: 1rem 0;
    }

    .student-management h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group input,
    .btn {
        width: 100%;
        min-width: unset;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

    .student-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .student-item .remove-student {
        width: 100%;
        margin-top: 0.3rem;
        padding: 0.5rem;
    }
    
    .student-summary {
        gap: 0.8rem;
        margin-top: 1.2rem;
    }

    .summary-card {
        flex: 1 1 45%; /* 2 cards per row with less space */
        padding: 0.8rem;
        min-width: 100px;
    }

    .summary-value {
        font-size: 1.5rem;
    }

    .summary-label {
        font-size: 0.85rem;
    }
}
