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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.auth-card h1 {
    text-align: center;
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.auth-subtitle {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
}

.code-group {
    display: flex;
    gap: 8px;
}

.code-group input {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: #40a9ff;
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover:not(:disabled) {
    background: #d9d9d9;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #73d13d;
}

.btn-warning {
    background: #faad14;
    color: #fff;
}

.btn-warning:hover:not(:disabled) {
    background: #ffc53d;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #ff7875;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}

/* Auth links */
.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.auth-links a {
    color: #1890ff;
    font-size: 13px;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Messages */
.error-msg {
    margin-top: 16px;
    padding: 10px 12px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    color: #ff4d4f;
    font-size: 13px;
    display: none;
}

.error-msg.visible {
    display: block;
}

.success-msg {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    color: #52c41a;
    font-size: 14px;
    z-index: 1000;
    display: none;
}

.success-msg.visible {
    display: block;
}

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.dashboard-header h1 {
    font-size: 24px;
    color: #1a1a1a;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    font-size: 14px;
    color: #666;
}

/* User Info Panel */
.user-info-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    align-items: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-label {
    font-size: 14px;
    color: #888;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.info-divider {
    color: #d9d9d9;
}

/* Upload Area */
.upload-area {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.upload-zone {
    width: 100%;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.upload-zone:hover {
    border-color: #1890ff;
    background: #f0f5ff;
}

.upload-zone.dragover {
    border-color: #1890ff;
    background: #e6f7ff;
}

.upload-zone p {
    color: #999;
    font-size: 14px;
}

/* File Table */
.file-list-container {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow-x: auto;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    color: #888;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.file-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.file-table tr:hover td {
    background: #fafafa;
}

.file-table .empty-tip {
    text-align: center;
    color: #bbb;
    padding: 40px;
}

.file-name {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #888;
    font-size: 13px;
}

.file-time {
    color: #888;
    font-size: 13px;
}

.file-link {
    font-size: 12px;
    color: #1890ff;
    text-decoration: none;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    white-space: nowrap;
}

.file-link:hover {
    text-decoration: underline;
}

.file-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #d9d9d9;
    transition: 0.2s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    transition: 0.2s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: #52c41a;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

/* Shop */
.shop-container {
    background: #fff;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.shop-container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 16px;
}

.shop-placeholder {
    color: #999;
    font-size: 16px;
    margin-bottom: 8px;
}

.shop-placeholder-sub {
    color: #bbb;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        padding: 12px;
    }

    .user-info-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-table {
        font-size: 12px;
    }

    .file-table th,
    .file-table td {
        padding: 8px 10px;
    }

    .file-actions {
        flex-direction: column;
    }
}