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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Glassmorphism Card */
.card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

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

h1 {
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.subtitle {
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 14px 0 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input::placeholder { color: transparent; }

.input-group label {
    position: absolute;
    left: 0;
    top: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f093fb, #f5576c);
    transition: all 0.3s ease;
}

.input-group input:focus ~ .input-line {
    left: 0;
    width: 100%;
}

/* Tips */
.tips {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: rise linear infinite;
}

@keyframes rise {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.toast-warning { background: linear-gradient(135deg, #ffa502, #ff6348); }
.toast-success { background: linear-gradient(135deg, #2ed573, #1e90ff); }
.toast-icon {
    width: 18px; height: 18px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9998;
    opacity: 0; transition: opacity 0.25s ease;
    padding: 20px;
}
.modal-overlay.show { opacity: 1; }
.modal-overlay.show .modal { transform: scale(1) translateY(0); }
.modal {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.5rem 1.5rem;
    max-width: 300px; width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute; top: 12px; right: 14px;
    background: #f0f0f0; border: none; border-radius: 50%;
    width: 26px; height: 26px; cursor: pointer;
    font-size: 0.75rem; color: #888;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.modal-close:hover { background: #e0e0e0; color: #444; }
.modal-icon { font-size: 2.5rem; margin-bottom: 0.6rem; }
.modal-title { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 0.5rem; }
.modal-body { font-size: 0.82rem; color: #666; line-height: 1.6; margin-bottom: 1.2rem; }
.modal-body strong { color: #333; }
.modal-btn {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; text-decoration: none;
    border-radius: 100px;
    font-size: 0.85rem; font-weight: 600;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(102,126,234,0.35);
}
.modal-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102,126,234,0.45); }

/* Responsive */
@media (max-width: 480px) {
    .card { padding: 2rem 1.5rem; border-radius: 16px; }
    h1 { font-size: 1.3rem; }
}

@media (min-width: 768px) {
    .card { padding: 3rem 2.5rem; }
}
