/* ========================================
   认证界面样式 - Auth Styles
   ======================================== */

/* 认证遮罩层 */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://picsum.photos/1920/1080') center center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 认证卡片 */
.auth-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 48px 40px;
    border-radius: 20px;
    width: 400px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图标容器 */
.auth-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.auth-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* 标题和副标题 */
.auth-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
}

.auth-subtitle {
    margin: 0 0 32px;
    font-size: 14px;
    color: #666;
}

/* 表单样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form-group {
    text-align: left;
}

.auth-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.8);
}

.auth-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 提交按钮 */
.auth-btn {
    width: 100%;
    padding: 0;
    line-height: 48px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

/* 错误提示 */
.auth-error {
    color: #e74c3c;
    margin-top: 16px;
    font-size: 13px;
    min-height: 20px;
    text-align: center;
}

/* 切换链接 */
.auth-switch {
    margin-top: 24px;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========================================
   加载进度样式 - Loading Styles
   ======================================== */

.page-loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #667eea;
    font-size: 18px;
    gap: 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-progress {
    width: 200px;
    height: 6px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.loader-text {
    font-size: 14px;
    color: #999;
}

/* ========================================
   退出按钮样式 - Logout Button
   ======================================== */

.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-nickname {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    transition: background 0.2s;
}

.user-nickname:hover {
    background: rgba(255, 255, 255, 1);
}

.logout-btn {
    padding: 0 16px;
    line-height: 40px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: background 0.2s, transform 0.2s;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 1);
    transform: translateY(-1px);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-dropdown-item:hover {
    background: #f5f5f5;
}

.user-dropdown-item svg {
    width: 18px;
    height: 18px;
    stroke: #666;
    stroke-width: 2;
    fill: none;
}

/* ========================================
   音乐控制按钮 - Music Control
   ======================================== */

.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.music-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.music-btn:active {
    transform: scale(0.95);
}

.music-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.music-btn.playing .music-icon-pause {
    display: block;
}

.music-btn.playing .music-icon-play {
    display: none;
}

.music-btn:not(.playing) .music-icon-pause {
    display: none;
}

.music-btn:not(.playing) .music-icon-play {
    display: block;
}

/* 旋转动画 */
.music-btn.playing::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.6);
    border-right-color: rgba(255, 255, 255, 0.4);
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* 音量控制面板 */
.volume-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: absolute;
    bottom: 70px;
    right: 0;
    min-width: 140px;
}

.volume-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.volume-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e8e8e8;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.volume-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    text-align: center;
}

/* ========================================
   响应式适配 - Responsive
   ======================================== */

@media screen and (max-width: 736px) {
    .auth-card {
        padding: 36px 24px;
        width: 100%;
        max-width: 320px;
    }

    .auth-title {
        font-size: 20px;
    }

    .user-menu {
        top: 15px;
        right: 15px;
        gap: 8px;
    }

    .user-nickname {
        display: none;
    }

    .logout-btn {
        padding: 0 12px;
        line-height: 36px;
        font-size: 12px;
    }

    .music-control {
        bottom: 20px;
        right: 20px;
    }

    .music-btn {
        width: 48px;
        height: 48px;
    }

    .music-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media screen and (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .auth-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .auth-icon svg {
        width: 24px;
        height: 24px;
    }

    .auth-btn {
        line-height: 44px;
        font-size: 15px;
    }
}
