/* Global styles */
:root {
    --primary-color: #22D3C5;
    --secondary-color: #20124D;
    --text-color: #333333;
    --background-color: #FFFFFF;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #24204F;
    text-decoration: none;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.btn-secondary {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
}

.btn-text {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
}

/* Typography */
h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

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

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

/* 导入对话框特殊样式 */
#importModal .modal-content {
    width: 600px;
}

.modal.show .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    color: #666;
}

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

.modal-footer .btn-secondary {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

.modal-footer .btn-secondary:hover {
    background-color: #f5f5f5;
}

.modal-footer .btn-primary:hover {
    opacity: 0.9;
}

/* Toast 提示框样式 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: rgba(34, 211, 197, 0.9);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(34, 211, 197, 0.2);
    backdrop-filter: blur(8px);
    max-width: 80%;
    display: block !important;
}

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

.toast.success {
    background-color: rgba(34, 211, 197, 0.9);
}

.toast.error {
    background-color: rgba(255, 77, 79, 0.9);
}

.toast.warning {
    background-color: rgba(250, 173, 20, 0.9);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-icon {
    font-size: 16px;
}

.toast-message {
    flex: 1;
    word-break: break-word;
}

/* ==================== 移动端适配 ==================== */

/* 导航栏移动端适配 */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .nav-buttons {
        gap: 0.5rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 14px;
    }

    h1 {
        font-size: 1.8rem;
    }

    /* 模态框移动端适配 */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 16px;
        flex-wrap: wrap;
    }

    /* Toast提示框移动端适配 */
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}