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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    padding-top: 64px;
    padding-bottom: 80px;
    /* 禁用文本选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-desc {
    font-size: 1.1rem;
    opacity: 0.95;
}

.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.tabs {
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab {
    flex: 1;
    padding: 1.2rem 2rem;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab:hover {
    background: #f8f9fa;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

.content-area {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.panel {
    display: none;
}

.panel.active {
    display: block;
}

.preview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.settings-section h3 {
    font-size: 1.3rem;
    color: #1a202c;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
}

.color-preview {
    background: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
                linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.current-color-box {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.color-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.value-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.value-item .label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.value-item .value {
    font-family: 'Consolas', monospace;
    font-size: 1rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #374151;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.gradient-preview {
    height: 150px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.css-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.2rem;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 1rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.palette-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.palette-item:hover {
    transform: scale(1.05);
}

.palette-color {
    height: 100px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.palette-label {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    font-family: 'Consolas', monospace;
}

.palette-section {
    margin-bottom: 2rem;
}

.palette-section h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    z-index: 2000;
    font-weight: 600;
}

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

.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

@media (max-width: 968px) {
    .preview-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-title {
        font-size: 1.8rem;
    }
    .tabs {
        flex-direction: column;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

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

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

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s;
}

.close-modal:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.modal-body h3 {
    color: #667eea;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    color: #374151;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.modal-body strong {
    color: #667eea;
}
