/* 现代化简约风格授权系统 */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-light: #e9ecef;
    --gray-medium: #adb5bd;
    --gray-dark: #495057;
    --border-radius: 12px;
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.15);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    padding: 0 1.5rem;
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* 主要区域 */
.section {
    padding: 3rem 1.5rem;
    animation: fadeIn 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 主标题 */
.main-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.main-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.main-title p {
    color: var(--gray-dark);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 功能按钮区 */
.function-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--box-shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

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

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

.btn-tertiary {
    background: white;
    color: var(--gray-dark);
    border: 2px solid var(--gray-light);
}

.btn-tertiary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 程序卡片区 */
.programs-section {
    margin-bottom: 3rem;
}

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

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-medium);
}

/* 程序卡片网格 */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.program-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.card-title h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.card-title .version {
    color: var(--gray-medium);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-badge {
    background: linear-gradient(135deg, var(--success-color), #0cb487);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    margin-bottom: 2rem;
}

.card-content p {
    color: var(--gray-dark);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.update-highlight {
    background: rgba(6, 214, 160, 0.1);
    border-left: 3px solid var(--success-color);
    padding: 0.75rem;
    margin-top: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.update-highlight strong {
    color: var(--success-color);
    font-weight: 600;
}

.card-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.card-btn {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.card-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.card-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #6610a8);
}

.card-btn.secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

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

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-medium);
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background: var(--gray-light);
    color: var(--dark-color);
}

.modal-body {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 3rem;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* 通知样式 */
.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: rgba(6, 214, 160, 0.1);
    border-left: 4px solid var(--success-color);
}

.notification.error {
    background: rgba(239, 71, 111, 0.1);
    border-left: 4px solid var(--danger-color);
}

.notification.info {
    background: rgba(67, 97, 238, 0.1);
    border-left: 4px solid var(--primary-color);
}

.notification .icon {
    font-size: 1.5rem;
}

.notification.success .icon { color: var(--success-color); }
.notification.error .icon { color: var(--danger-color); }
.notification.info .icon { color: var(--primary-color); }

/* 步骤指示器 */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-light);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    color: var(--gray-medium);
    transition: var(--transition);
}

.step.active .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step.completed .step-circle {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* 授权信息卡片 */
.auth-info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.info-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* 更新记录样式 */
.update-log {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.update-log::-webkit-scrollbar {
    width: 6px;
}

.update-log::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 3px;
}

.update-log::-webkit-scrollbar-thumb {
    background: var(--gray-medium);
    border-radius: 3px;
}

.update-item {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

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

.update-version {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.update-date {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 0.5rem;
}

.update-content {
    color: var(--dark-color);
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section {
        padding: 2rem 1rem;
    }
    
    .main-title h1 {
        font-size: 2rem;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .function-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-box {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

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

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gray-dark);
}