/* assets/style.css - 样式文件 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    min-height: 100vh;
    color: #333;
}

/* 前端样式 */
.app-store {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    min-height: 700px;
    margin: 20px auto;
    animation: fadeIn 0.8s ease-out;
}

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

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #e53935 0%, #c62828 100%);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.categories {
    flex: 1;
}

.category-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.category-item:hover {
    background: rgba(255,255,255,0.1);
}

.category-item.active {
    background: rgba(255,255,255,0.2);
    font-weight: bold;
}

.category-icon {
    margin-right: 10px;
    font-size: 18px;
}

.admin-link {
    margin-top: 20px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(255,255,255,0.3);
}

.main-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.title {
    font-size: 28px;
    font-weight: bold;
    color: #e53935;
}

.search-box {
    display: flex;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 5px 15px;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    padding: 8px;
}

.search-icon {
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    flex: 1;
}

.software-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #f0f0f0;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(229, 57, 53, 0.15);
    border-color: #e53935;
}

.software-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.download-btn {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: 10px;
}

.download-btn:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.3);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    background: #f5f5f5;
}

.page-btn.active {
    background: #e53935;
    color: white;
    border-color: #e53935;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #e53935;
    text-align: center;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #e53935;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.2);
}

.system-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.system-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.system-option:hover {
    border-color: #e53935;
}

.system-option.selected {
    border-color: #e53935;
    background: rgba(229, 57, 53, 0.1);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cancel-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn:hover {
    background: #f5f5f5;
}

.confirm-btn {
    padding: 10px 20px;
    border: none;
    background: #e53935;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.confirm-btn:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(229, 57, 53, 0.3);
}

/* 倒计时页面样式 */
.countdown-container {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 50px auto;
}

.countdown-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e53935;
}

.countdown-number {
    font-size: 72px;
    font-weight: bold;
    color: #e53935;
    margin: 30px 0;
    animation: pulse 1s infinite;
}

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

.redirect-message {
    margin-top: 20px;
    color: #777;
}

.software-name {
    font-weight: bold;
    color: #e53935;
}

.manual-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #e53935;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.manual-link:hover {
    background: #c62828;
}

/* 后台管理样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #e53935;
    text-align: center;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #e53935;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.admin-container {
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e53935;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.admin-title {
    font-size: 24px;
    font-weight: bold;
    color: #e53935;
}

.logout-button, .back-button {
    background: #e53935;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-button:hover, .back-button:hover {
    background: #c62828;
}

.admin-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-select:focus {
    border-color: #e53935;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.2);
}

.submit-button {
    background: #e53935;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: #c62828;
}

.password-info {
    background: #fff3e0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* 软件列表管理样式 */
.software-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.software-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.software-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.software-info {
    flex: 1;
}

.software-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 18px;
    color: #333;
}

.software-category {
    color: #e53935;
    font-weight: 500;
    margin-bottom: 10px;
}

.software-links {
    color: #666;
    font-size: 14px;
}

.software-links small {
    display: block;
    margin-bottom: 3px;
    word-break: break-all;
}

.software-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 15px;
}

.edit-button, .delete-button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 70px;
}

.edit-button {
    background: #2196F3;
    color: white;
}

.edit-button:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
}

.delete-button {
    background: #f44336;
    color: white;
}

.delete-button:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(244, 67, 54, 0.3);
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    background: #e53935;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.action-button:hover {
    background: #c62828;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.logs-table th, .logs-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.logs-table th {
    background-color: #e53935;
    color: white;
}

.logs-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.logs-table tr:hover {
    background-color: #f1f1f1;
}

.no-logs {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* 弹性过渡动画 */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    70% {
        opacity: 0.7;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes scaleOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #777;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e53935;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #666;
}

/* 分类项悬停效果增强 */
.category-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-item:hover::before {
    left: 100%;
}

.category-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 软件卡片悬停效果增强 */
.software-card {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.software-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(229, 57, 53, 0.2);
}

/* 分页按钮动画 */
.page-btn {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    overflow: hidden;
}

.page-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 57, 53, 0.1), transparent);
    transition: left 0.5s;
}

.page-btn:hover::before {
    left: 100%;
}

.page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.page-btn.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(229, 57, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
    }
}

/* 下载按钮动画 */
.download-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 15px rgba(229, 57, 53, 0.3);
}

/* 模态框动画增强 */
.modal-content {
    animation: modalBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes modalBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 系统选择项动画 */
.system-option {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.system-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.system-option.selected {
    animation: selectedPulse 1.5s infinite;
}

@keyframes selectedPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(229, 57, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
    }
}

/* 软件容器动画 */
#software-container {
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}