/* NAI 主页样式 */
* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    width: 100vw;
    min-height: 100%;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    margin: 0;
    width: 100vw;
    overflow-x: hidden;
    padding: 20px;
    min-height: 100vh;
}

body::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track {
    background: #EBF2F4;
}

body::-webkit-scrollbar-thumb {
    background: #8b8b8b52;
    border-radius: 10px;
}

.page-container {
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.content-wrap {
    flex: 1;
}

main {
    max-width: 100%;
    width: 560px;
    margin: auto;
}

#notificationsContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 300px;
    position: relative;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
}

.notification .proline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: #4c7aaf;
}

.main {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.main > p {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.main > p svg:first-child {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.main > p .arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.main > p .arrow.rotate {
    transform: rotate(180deg);
}

/* 导航栏样式 */
.nav-card {
    padding: 15px 25px;
}

.nav-card:hover {
    transform: none;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-title {
    font-size: 16px !important;
    margin: 0 !important;
    cursor: default !important;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: #111827;
}

.nav-links a.active {
    color: #4c7aaf;
    border-bottom-color: #4c7aaf;
}

.info-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0e8fd 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #4c7aaf;
}

.info-box p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.info-box strong {
    color: #4c7aaf;
}

.section-content {
    margin-top: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.section-content.collapsed {
    display: none;
}

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

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="number"],
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: #4c7aaf;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(76, 122, 175, 0.1);
}

.input-group small {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.custom-size {
    display: flex;
    gap: 15px;
}

.custom-size .input-group.half {
    flex: 1;
}

.generate-btn, .test-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4c7aaf 0%, #6b5ce7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 122, 175, 0.3);
    margin-bottom: 10px;
}

.test-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.generate-btn:hover, .test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 122, 175, 0.4);
}

.generate-btn:active, .test-btn:active {
    transform: translateY(0);
}

.result-container {
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f0ff 100%);
}

.result-section {
    margin-top: 20px;
}

.result-section:first-of-type {
    margin-top: 15px;
}

.result-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.result-section textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d0e0f0;
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: #fff;
    resize: vertical;
    line-height: 1.5;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.copy-btn,
.download-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.copy-btn {
    background: #4c7aaf;
    color: white;
}

.copy-btn:hover {
    background: #3d6490;
}

.download-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.help-content {
    padding: 10px 0;
}

.help-content h3 {
    font-size: 15px;
    color: #333;
    margin: 15px 0 8px 0;
}

.help-content h3:first-child {
    margin-top: 0;
}

.help-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.help-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #e74c3c;
}

footer {
    text-align: center;
    padding: 20px;
    color: #888;
}

footer p {
    margin: 0;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    
    .main {
        padding: 20px;
    }
    
    .main > p {
        font-size: 16px;
    }
    
    .custom-size {
        flex-direction: column;
        gap: 0;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    #notificationsContainer {
        right: 15px;
        left: 15px;
    }
    
    .notification {
        max-width: none;
    }
    
    .nav-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
    }
}
