/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #d282ff 0%, #009d77 70%, #7b36ff 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: white;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.logo p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* 认证选择区域 */
.auth-selection {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin-bottom: 40px;
}

.auth-selection h2 {
    color: #7b36ff;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.auth-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-btn {
    background: #7b36ff;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn:hover {
    background: #6a28e0;
}

/* 密码保护区域样式 */
.password-protection {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin-bottom: 40px;
}

.password-protection h2 {
    color: #7b36ff;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.password-protection p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    color: #7b36ff;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-group input {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: #7b36ff;
    outline: none;
}

.submit-btn {
    background: #7b36ff;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #6a28e0;
}

.back-btn {
    background: transparent;
    color: #7b36ff;
    border: 1px solid #7b36ff;
    padding: 10px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #7b36ff;
    color: white;
}

.error-message {
    color: #ff4d4d;
    background: rgba(255, 220, 220, 0.5);
    padding: 10px;
    border-radius: 8px;
    display: none;
    margin-top: 10px;
}

.attempts-warning {
    color: #ff9900;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 内容区域样式 */
.content-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: none; /* 默认隐藏内容区域 */
}

.content-header {
    margin-bottom: 30px;
    text-align: center;
}

.content-header h2 {
    color: #7b36ff;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.content-header p {
    color: #666;
    line-height: 1.6;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

.resource-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.resource-table th,
.resource-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.resource-table th {
    background-color: #f8f8f8;
    color: #7b36ff;
    font-weight: 600;
}

.resource-table tr:hover {
    background-color: #f9f9f9;
}

.password-cell {
    position: relative;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* 允许按钮换行，适应小屏幕 */
}

.toggle-btn {
    background: none;
    border: none;
    color: #7b36ff;
    cursor: pointer;
    font-size: 1rem;
}

.copy-btn, .copy-all-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.copy-btn:hover, .copy-all-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.back-link {
    display: inline-block;
    color: #7b36ff;
    text-decoration: none;
    margin-top: 20px;
    padding: 10px 20px;
    border: 1px solid #7b36ff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #7b36ff;
    color: white;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #666;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .password-protection,
    .content-area,
    .auth-selection {
        padding: 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .resource-table th,
    .resource-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
}