:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #1abc9c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 0;
    text-align: center;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.unit-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-color);
}

.unit-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.unit-info {
    margin-bottom: 10px;
}

.info-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-value {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    word-break: break-all;
}

.info-value:hover {
    background-color: #e9ecef;
}

.info-value.copied::after {
    content: '已复制';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    animation: fadeOut 1s forwards 1s;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

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

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

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

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

.modal-body {
    padding: 20px;
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: var(--dark-color);
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .units-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
}
/* 响应式标题字体大小 - 精细控制 */
@media (max-width: 1200px) {
    h1 {
        font-size: 2.3rem;
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.1rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 15px;
    }
    
    .subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.5rem;
        padding: 0 10px;
    }
    
    .subtitle {
        font-size: 0.9rem;
        padding: 0 15px;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
}
/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
    border-radius: 10px 10px 0 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-logo i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.footer-desc {
    opacity: 0.9;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
    margin: 15px 0;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    width: 100%;
}

.footer-copyright p {
    margin: 5px 0;
    opacity: 0.8;
}

.footer-version {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* 响应式页脚 */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 15px;
        margin-top: 30px;
    }
    
    .footer-logo {
        font-size: 1.3rem;
    }
    
    .footer-logo i {
        font-size: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-link {
        justify-content: center;
    }
    
    .footer-content {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 25px 0 15px;
    }
    
    .footer-logo {
        font-size: 1.2rem;
    }
    
    .footer-desc {
        font-size: 0.9rem;
    }
    
    .footer-copyright p {
        font-size: 0.9rem;
    }
    
    .footer-version {
        font-size: 0.8rem;
    }
}