/* Basketball Manager 2026 - 主样式 */

/* 颜色变量 */
:root {
    --nba-blue: #1d428a;
    --nba-red: #c8102e;
    --nba-white: #ffffff;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* NBA主题导航栏 */
.bg-nba {
    background: linear-gradient(135deg, var(--nba-blue) 0%, #2a5298 100%);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 首页英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

/* 表格样式 */
.table th {
    font-weight: 600;
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(29, 66, 138, 0.05);
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* 进度条样式 */
.progress {
    background-color: #e9ecef;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--nba-blue);
    border-color: var(--nba-blue);
}

.btn-primary:hover {
    background-color: #15326d;
    border-color: #15326d;
    transform: translateY(-2px);
}

/* 球队头部样式 */
.team-header {
    position: relative;
    overflow: hidden;
}

.team-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

/* 球员卡片 */
.player-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.player-card:hover {
    transform: translateY(-5px);
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nba-blue), var(--nba-red));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* 属性条 */
.attribute-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.attribute-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.attribute-bar-fill.high { background-color: #28a745; }
.attribute-bar-fill.medium { background-color: #ffc107; }
.attribute-bar-fill.low { background-color: #dc3545; }

/* 比赛直播样式 */
.scoreboard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.score-display {
    font-size: 4rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.team-score {
    display: inline-block;
    padding: 0 2rem;
}

.vs-divider {
    display: inline-block;
    font-size: 2rem;
    color: #ffc107;
    padding: 0 1rem;
}

/* 游戏日志 */
.game-log {
    max-height: 400px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
}

.log-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: #6c757d;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .score-display {
        font-size: 2.5rem;
    }
    
    .team-score {
        padding: 0 1rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

/* 浮动按钮容器 */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

/* 浮动的"下一天"按钮 */
.btn-advance-day {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    border: none;
    cursor: pointer;
}

.btn-advance-day:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.btn-advance-day i {
    font-size: 1.2rem;
}

/* 自动运行按钮 */
.btn-auto-run {
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    color: white;
}

.btn-auto-run.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-auto-run.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    animation: pulse 1s infinite;
}

.btn-auto-run:hover {
    transform: translateY(-3px);
}

/* 左侧导航栏样式 */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1d428a 0%, #0f2851 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.sidebar-brand:hover {
    color: #ffc107;
}

.sidebar-brand i {
    font-size: 1.5rem;
}

.sidebar-date {
    margin-top: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0;
}

.sidebar-section {
    margin-bottom: 0.75rem;
}

.sidebar-section-header {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.sidebar-section-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-section-header i {
    font-size: 1.1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 0 8px 8px 0;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: rgba(255, 193, 7, 0.5);
}

.sidebar-menu li a.active {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-left-color: #ffc107;
}

.sidebar-menu li span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    color: rgba(255, 255, 255, 0.35);
    cursor: not-allowed;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* 侧边栏底部用户信息 */
.sidebar-footer {
    flex-shrink: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-team {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions a {
    color: rgba(255, 255, 255, 0.6);
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.user-actions a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.auth-links {
    display: flex;
    gap: 8px;
}

.auth-links .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.5rem;
}

/* 主内容区 */
.content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    background-color: #f8f9fa;
}

.content.expanded {
    margin-left: 60px;
}

.content-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-sidebar-toggle {
    background: none;
    border: 1px solid #e9ecef;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sidebar-toggle:hover {
    background: rgba(29, 66, 138, 0.08);
    color: #1d428a;
    border-color: rgba(29, 66, 138, 0.3);
}

.content-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-display {
    background: linear-gradient(135deg, #1d428a 0%, #2a5298 100%);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(29, 66, 138, 0.3);
}

/* 主内容区域 */
.content main {
    flex: 1;
    padding: 2rem;
}

/* 内容页脚 */
.content-footer {
    background: #ffffff;
    padding: 1rem 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid #e9ecef;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 200px;
    }
    
    .sidebar.collapsed {
        width: 50px;
    }
    
    .content.expanded {
        margin-left: 50px;
    }
    
    .content main {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 2000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .content.expanded {
        margin-left: 0;
    }
    
    .btn-sidebar-toggle {
        display: block;
    }
    
    .content main {
        padding: 1rem;
    }
}

.btn-auto-run.btn-success:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.btn-auto-run.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

.btn-auto-run i {
    font-size: 1.2rem;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
