/* WindBot - 智能化风电场文件管理系统样式 */

/* ===== CSS变量 ===== */
:root {
    --primary: #1a5fb4;
    --primary-dark: #144a8f;
    --secondary: #26a269;
    --accent: #f8e45c;
    --danger: #c01c28;
    --warning: #e5a50a;
    --bg-main: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #2e3436;
    --text-secondary: #636668;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 8px;
}

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 背景动画：真实图片风力发电机山区景色 ===== */
/* 备份: style.css.backup-windbg-orig */

.wind-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    /* 主背景：风机山体真实图片 */
    background: 
        url('../../uploads/demo/20260506072959_65b3b4bad470deb7.png') no-repeat center center;
    background-size: cover;
}

/* 远景山脉层（叠加在主图上，透明度渐变融合） */
.wind-bg::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: 
        linear-gradient(to bottom, 
            rgba(255,255,255,0) 0%, 
            rgba(255,255,255,0.05) 15%, 
            rgba(0,0,0,0.2) 40%, 
            rgba(0,0,0,0.6) 70%, 
            rgba(0,0,0,0.9) 100%),
        url('../images/mountains.jpg') no-repeat center bottom;
    background-size: 100% 100%, cover;
    animation: mountainDrift 120s ease-in-out infinite alternate;
}

/* 近景山丘叠加层 */
.wind-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: 
        linear-gradient(to bottom,
            rgba(0,0,0,0) 0%,
            rgba(0,0,0,0.1) 20%,
            rgba(0,0,0,0.5) 60%,
            rgba(0,0,0,0.85) 100%),
        url('../images/hills_rolling.jpg') no-repeat center bottom;
    background-size: 100% 100%, cover;
    animation: mountainDrift 80s ease-in-out infinite alternate-reverse;
    opacity: 0.85;
}

/* 云层容器 */
.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* 飘动的云 */
.floating-clouds {
    position: absolute;
    top: 5%;
    width: 250%;
    height: 35%;
    background: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300'%3E%3Cellipse fill='rgba(255,255,255,0.25)' cx='80' cy='150' rx='100' ry='45'/%3E%3Cellipse fill='rgba(255,255,255,0.2)' cx='250' cy='120' rx='130' ry='55'/%3E%3Cellipse fill='rgba(255,255,255,0.18)' cx='500' cy='140' rx='160' ry='60'/%3E%3Cellipse fill='rgba(255,255,255,0.22)' cx='750' cy='110' rx='120' ry='50'/%3E%3Cellipse fill='rgba(255,255,255,0.15)' cx='920' cy='155' rx='90' ry='40'/%3E%3C/svg%3E");
    background-size: 1000px 300px;
    animation: cloudFloat 100s linear infinite;
    opacity: 0.9;
}

.floating-clouds-2 {
    position: absolute;
    top: 15%;
    width: 250%;
    height: 28%;
    background: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 250'%3E%3Cellipse fill='rgba(255,255,255,0.15)' cx='60' cy='130' rx='80' ry='35'/%3E%3Cellipse fill='rgba(255,255,255,0.12)' cx='300' cy='100' rx='110' ry='45'/%3E%3Cellipse fill='rgba(255,255,255,0.1)' cx='580' cy='120' rx='140' ry='50'/%3E%3Cellipse fill='rgba(255,255,255,0.13)' cx='830' cy='90' rx='100' ry='40'/%3E%3C/svg%3E");
    background-size: 1000px 250px;
    animation: cloudFloat 140s linear infinite reverse;
    opacity: 0.7;
}

/* 前景真实感风机（CSS绘制） */
.turbine {
    position: absolute;
    bottom: 12%;
    z-index: 4;
    transform-origin: bottom center;
}

.t1 { left: 6%;  width: 160px; height: 300px; opacity: 0.95; bottom: 40%; animation: tSway 7s ease-in-out infinite; }
.t2 { left: 28%; width: 110px; height: 200px; opacity: 0.80; bottom: 36%; animation: tSway 9s ease-in-out infinite reverse; }
.t3 { right: 30%; width: 130px; height: 240px; opacity: 0.90; bottom: 42%; animation: tSway 8s ease-in-out infinite; }
.t4 { right: 5%; width: 95px;  height: 175px; opacity: 0.75; bottom: 38%; animation: tSway 6s ease-in-out infinite reverse; }

/* 塔筒 */
.t-tower {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10%;
    height: 72%;
    background: linear-gradient(90deg,
        #555 0%,
        #999 20%,
        #ccc 45%,
        #bbb 55%,
        #888 100%
    );
    border-radius: 2px 2px 0 0;
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
}

/* 机舱 */
.t-nacelle {
    position: absolute;
    bottom: 70%;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 8%;
    background: linear-gradient(to bottom, #ddd, #888);
    border-radius: 4px;
}

/* 叶片旋转中心 */
.t-blade {
    position: absolute;
    bottom: 74%;
    left: 50%;
    width: 3%;
    height: 50%;
    transform-origin: bottom center;
}

/* 三片叶片 */
.t-blade::before,
.t-blade::after,
.t-blade .b3 {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400%;
    height: 100%;
    background: linear-gradient(to top, #aaa, #fff);
    border-radius: 50% 50% 5px 5px;
    transform-origin: bottom center;
}

.t-blade::before { transform: translateX(-50%) rotate(0deg); }
.t-blade::after  { transform: translateX(-50%) rotate(120deg); }
.t-blade .b3     { transform: translateX(-50%) rotate(240deg); }

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

@keyframes tSway {
    0%, 100% { transform: rotate(-1.5deg); }
    50%       { transform: rotate(1.5deg); }
}

/* 前景草地 */
.foreground-grass {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: 
        linear-gradient(to bottom, 
            rgba(0,0,0,0) 0%, 
            rgba(10,40,20,0.8) 30%, 
            rgba(5,25,12,1) 100%),
        url('../images/field_hills.jpg') no-repeat center bottom;
    background-size: 100% 100%, cover;
    z-index: 3;
}

/* 阳光光晕 */
.sun-glow {
    position: absolute;
    top: 8%;
    right: 12%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, 
        rgba(255,230,100,0.5) 0%, 
        rgba(255,210,80,0.25) 40%, 
        rgba(255,200,60,0.1) 60%,
        transparent 80%);
    border-radius: 50%;
    animation: sunPulse 8s ease-in-out infinite;
    filter: blur(8px);
}

/* 动画 */
@keyframes cloudFloat {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes mountainDrift {
    0% { transform: translateX(-3%) scale(1.02); }
    100% { transform: translateX(3%) scale(0.98); }
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* ===== 导航栏 ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-brand i {
    font-size: 1.8rem;
    animation: spin 10s linear infinite;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.lang-active {
    color: var(--primary) !important;
    font-weight: 700;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(26, 95, 180, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 95, 180, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #1e8449);
    color: white;
    box-shadow: 0 4px 15px rgba(38, 162, 105, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 162, 105, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #a01722);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg-card);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.1);
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
}

/* ===== 登录/注册页面 ===== */
.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 30px rgba(26, 95, 180, 0.3);
}

.auth-header .logo i {
    font-size: 2.5rem;
    color: white;
    animation: spin 8s linear infinite;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===== 用户中心 ===== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
}

/* ===== 存储信息卡片 ===== */
.storage-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.storage-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.storage-card h3 {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.storage-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.storage-numbers {
    font-size: 2rem;
    font-weight: 700;
}

.storage-numbers span {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.storage-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 1rem;
}

.storage-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* ===== 上传区域 ===== */
.upload-zone {
    border: 3px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-card);
    margin-bottom: 2rem;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(26, 95, 180, 0.05);
}

.upload-zone i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-zone h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== 文件列表 ===== */
.file-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: rgba(26, 95, 180, 0.03);
}

.file-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.file-icon.image { background: linear-gradient(135deg, #e91e63, #9c27b0); color: white; }
.file-icon.document { background: linear-gradient(135deg, #2196f3, #03a9f4); color: white; }
.file-icon.archive { background: linear-gradient(135deg, #ff9800, #f44336); color: white; }
.file-icon.media { background: linear-gradient(135deg, #4caf50, #8bc34a); color: white; }
.file-icon.code { background: linear-gradient(135deg, #607d8b, #455a64); color: white; }
.file-icon.map { background: linear-gradient(135deg, #3f51b5, #1a237e); color: white; }
.file-icon.default { background: linear-gradient(135deg, #9e9e9e, #757575); color: white; }

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.file-actions .btn-download {
    background: var(--primary);
    color: white;
}

.file-actions .btn-download:hover {
    background: var(--primary-dark);
}

.file-actions .btn-delete {
    background: var(--danger);
    color: white;
}

.file-actions .btn-delete:hover {
    background: #a01722;
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: var(--primary); }
.stat-icon.green { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: var(--secondary); }
.stat-icon.yellow { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: var(--warning); }
.stat-icon.red { background: linear-gradient(135deg, #ffebee, #ffcdd2); color: var(--danger); }

.stat-content h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-content .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== 表格 ===== */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.data-table th, .data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.data-table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
}

.data-table tr:nth-child(even) {
    background: rgba(26, 95, 180, 0.03);
}

.data-table tr:hover {
    background: rgba(26, 95, 180, 0.06);
}

/* ===== 管理员侧边栏 ===== */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    padding: 2rem 0;
    flex-shrink: 0;
}

.admin-sidebar h2 {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.admin-nav {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 4px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.admin-nav a i {
    width: 20px;
    text-align: center;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-main);
}

/* ===== 消息提示 ===== */
.message {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: var(--secondary);
    color: white;
}

.message-error {
    background: var(--danger);
    color: white;
}

.message-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.message-info {
    background: var(--primary);
    color: white;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ===== 搜索框 ===== */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 1rem 0;
    }
    
    .admin-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-nav a {
        padding: 10px 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .file-item {
        flex-wrap: wrap;
    }
    
    .file-actions {
        width: 100%;
        margin-top: 0.5rem;
    }
}
