/* 投票系统自定义样式 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

/* 表格样式 */
.table {
    background-color: white;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem 1rem 0 0;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* 投票卡片样式 */
.vote-card {
    transition: transform 0.2s ease-in-out;
    min-height: auto;
}

.vote-card:hover {
    transform: translateY(-2px);
}

/* 投票按钮样式 */
.vote-card .btn {
    transition: all 0.2s ease-in-out;
}

.vote-card .btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.vote-card.voted {
    background-color: #e8f5e8;
    border-color: #28a745;
}

.vote-card.voted .card-header {
    background-color: #28a745;
    color: white;
}

/* 紧凑型投票卡片样式 */
.vote-card .card-header {
    padding: 0.5rem 1rem;
}

.vote-card .card-body {
    padding: 1rem;
}

.vote-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 统计页面样式 */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .stats-number {
        font-size: 2rem;
    }

    /* 移动端导航栏优化 */
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    /* 移动端卡片优化 */
    .vote-card {
        margin-bottom: 0.75rem;
    }

    .vote-card .card-header {
        padding: 0.4rem 0.75rem;
    }

    .vote-card .card-body {
        padding: 0.75rem;
    }

    .vote-card .card-title {
        font-size: 1rem;
    }

    /* 移动端表格优化 */
    .table-responsive table {
        font-size: 0.8rem;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.25rem;
    }

    /* 移动端按钮组优化 */
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* 移动端搜索框优化 */
    .search-box .form-control {
        font-size: 1rem; /* 防止iOS缩放 */
    }

    /* 移动端模态框优化 */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 576px) {
    .stats-number {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1rem;
    }

    /* 超小屏幕投票卡片优化 */
    .vote-card .card-header {
        padding: 0.3rem 0.5rem;
    }

    .vote-card .card-body {
        padding: 0.5rem;
    }

    .vote-card .card-title {
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* 超小屏幕表格优化 */
    .table-responsive {
        font-size: 0.75rem;
    }

    /* 超小屏幕分页优化 */
    .pagination {
        font-size: 0.875rem;
    }

    .page-link {
        padding: 0.375rem 0.75rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 文件上传区域 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    transition: border-color 0.15s ease-in-out;
}

.upload-area:hover {
    border-color: #007bff;
}

.upload-area.dragover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

/* 进度条样式 */
.progress {
    height: 1rem;
    border-radius: 0.5rem;
}

/* 徽章样式 */
.badge {
    font-size: 0.75em;
}

/* 分页样式 */
.pagination {
    justify-content: center;
}

/* 搜索框样式 */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-right: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

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

/* 确认对话框样式 */
.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}
