* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* Animated gradient background */
.gradient-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, rgb(var(--p-grad-a)), rgb(var(--p-grad-b)), rgb(var(--p-grad-c)), rgb(var(--p-grad-d)));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Toast 通知样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 20px rgb(var(--p-black) / 0.3);
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Floating particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgb(var(--p-white) / 0.15);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-100px) translateX(50px); }
    50% { transform: translateY(-50px) translateX(-50px); }
    75% { transform: translateY(-150px) translateX(100px); }
}

/* Glassmorphism card */
.glass-card {
    background: rgb(var(--p-white) / 0.15);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgb(var(--p-white) / 0.3);
    box-shadow: 0 8px 32px rgb(var(--p-black) / 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgb(var(--p-black) / 0.15);
}

/* Modern input */
.modern-input {
    background: rgb(var(--p-white) / 0.9);
    border: 2px solid rgb(var(--p-white) / 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.modern-input:focus {
    background: rgb(var(--p-white));
    border-color: rgb(var(--p-grad-a) / 0.6);
    box-shadow: 0 0 0 4px rgb(var(--p-grad-a) / 0.1);
    transform: scale(1.02);
}

/* Modern button */
.modern-btn {
    border: none;
    border-radius: 20px;
    padding: 18px 36px;
    font-size: 17px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn {
    background: linear-gradient(135deg, rgb(var(--p-grad-e)) 0%, rgb(var(--p-grad-f)) 100%);
    box-shadow: 0 6px 30px rgb(var(--p-grad-e) / 0.4);
}

.login-btn:hover {
    box-shadow: 0 8px 40px rgb(var(--p-grad-e) / 0.6);
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgb(var(--p-white) / 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-btn:hover::before {
    width: 800px;
    height: 800px;
}

.modern-btn:hover {
    transform: translateY(-4px) scale(1.02);
}

.modern-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(var(--p-black) / 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgb(var(--p-white) / 0.95);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgb(var(--p-black) / 0.3);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

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

/* Stagger animation */
.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }

/* Content wrapper */
.content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 20px;
}

/* Logo animation */
.logo {
    font-size: 48px;
    background: linear-gradient(135deg, rgb(var(--p-white)) 0%, rgb(var(--p-white) / 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Logout button */
.logout-btn {
    background: rgb(var(--p-red-500) / 0.2);
    color: white;
    border: 1px solid rgb(var(--p-red-500) / 0.3);
    border-radius: 10px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgb(var(--p-red-500) / 0.3);
    transform: scale(1.05);
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .content {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 10vh 14px 20px !important;
        justify-content: flex-start !important;
        gap: 0 !important;
    }

    .logo { font-size: 28px !important; }

    .particles { display: none !important; }

    .glass-card {
        border-radius: 16px !important;
        backdrop-filter: blur(12px) !important;
    }
    .glass-card:hover { transform: none !important; }

    .modern-input {
        padding: 11px 14px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
    }
    .modern-input:focus { transform: none !important; }

    .modern-btn {
        padding: 13px 18px !important;
        font-size: 14px !important;
        border-radius: 14px !important;
    }
    .modern-btn:hover, .modern-btn:active { transform: none !important; }
    .modern-btn::before { display: none !important; }

    .modal { padding: 12px !important; }
    .modal-content {
        padding: 20px 16px !important;
        border-radius: 16px !important;
        max-width: 100% !important;
        max-height: 88vh !important;
        overflow-y: auto !important;
    }

    .logout-btn { padding: 6px 12px !important; font-size: 12px !important; border-radius: 8px !important; }

    .toast-container {
        top: 8px !important; right: 8px !important; left: 8px !important;
        max-width: none !important;
    }
    .toast {
        padding: 10px 14px !important; font-size: 13px !important;
        border-radius: 10px !important;
    }

    #announcementModal .modal-content { max-width: 94vw !important; }
}
