/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header .container {
    background-color: rgba(30, 58, 138, 0.95);
    color: #ffffff;
}

footer .container {
    background-color: rgba(30, 58, 138, 0.95);
    color: #e2e8f0;
    text-align: center;
    margin-top: 40px;
}

/* 头部样式 */
header {
    padding: 20px 0;
}

header h1 {
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    text-decoration: underline;
    color: #93c5fd;
}

nav ul li span {
    color: #93c5fd;
    font-weight: 500;
}

/* 头部样式 */
header {
    padding: 20px 0;
}

header h1 {
    color: #ffffff;
    font-weight: 700;
}

/* 导航栏搜索样式 */
.search-nav-item {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.nav-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search-form input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 20px;
    transition: all 0.3s ease;
    width: 200px;
}

.nav-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.nav-search-form input:focus {
    outline: none;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    width: 250px;
}

.nav-search-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-search-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 搜索结果样式 */
.search-results {
    text-align: center;
    margin: 20px 0;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.6s ease-out;
    background-color: rgba(59, 130, 246, 0.1);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    margin-bottom: 20px;
    color: #1e3a8a;
    font-weight: 600;
}

h3 {
    color: #1e3a8a;
    font-weight: 600;
}

/* 软件卡片样式 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.software-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.software-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.software-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.software-card .company {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.software-card .category {
    color: #3b82f6;
    font-size: 0.8em;
    margin-bottom: 10px;
    font-weight: 500;
}

.software-card .description {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #475569;
}

/* 软件详情样式 */
.software-detail {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item strong {
    display: inline-block;
    width: 100px;
    font-weight: 600;
    color: #1e3a8a;
}

.detail-item span {
    color: #475569;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-edit {
    background-color: #10b981;
}

.btn-edit:hover {
    background-color: #059669;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-delete {
    background-color: #ef4444;
}

.btn-delete:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.btn-cancel {
    background-color: #64748b;
}

.btn-cancel:hover {
    background-color: #475569;
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.3);
}

/* 管理表格样式 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background-color: #1e3a8a;
    color: #ffffff;
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: #f1f5f9;
}

/* 表单样式 */
.form {
    background-color: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e3a8a;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error {
    color: #ef4444;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 页脚样式 */
footer {
    padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .software-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav ul li {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .search-nav-item {
        margin-left: 0;
        width: 100%;
    }
    
    .nav-search-form {
        width: 100%;
    }
    
    .nav-search-form input {
        width: 100%;
    }
    
    .nav-search-form input:focus {
        width: 100%;
    }
    
    .admin-table {
        font-size: 14px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}
