/* 机灵树美育教学软件样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* 导航栏样式 */
.nav-menu {
    background-color: #71BB39;
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(113, 187, 57, 0.2);
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
}

.nav-item:hover {
    background-color: #f0f9f0;
    color: #71BB39;
    transform: translateY(-2px);
}

.nav-item.active {
    background-color: #5a9c2a;
    color: white;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #71BB39 0%, #5a9c2a 100%);
    color: white;
    text-align: center;
    padding: 40px 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(113, 187, 57, 0.3);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 系统支持标识 */
.system-support {
    margin-top: 15px;
}

.system-tag {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.system-tag.windows {
    background-color: #00a4ef;
    color: #fff;
}

.system-tag.macos {
    background-color: #555555;
    color: #fff;
}

/* 主要内容区域 */
main {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

/* 输入区域 */
.input-section {
    margin-bottom: 30px;
}

.input-section h2 {
    color: #71BB39;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

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

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

#userPrompt {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fafbfc;
}

#userPrompt:focus {
    outline: none;
    border-color: #71BB39;
    background: white;
    box-shadow: 0 0 0 3px rgba(113, 187, 57, 0.1);
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 示例按钮 */
.example-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.example-btn {
    padding: 8px 15px;
    background: #f0f9f0;
    border: 1px solid #71BB39;
    border-radius: 20px;
    color: #71BB39;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: #71BB39;
    color: white;
    transform: translateY(-1px);
}

/* 生成按钮 */
.generate-section {
    text-align: center;
    margin-bottom: 30px;
}

#generateBtn {
    background: linear-gradient(135deg, #71BB39 0%, #5a9c2a 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(113, 187, 57, 0.3);
    position: relative;
    overflow: hidden;
}

#generateBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(113, 187, 57, 0.4);
}

#generateBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* 图片容器 */
.image-container {
    display: none;
    text-align: center;
    margin-top: 30px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 15px;
    border-left: 4px solid #71BB39;
}

.image-container.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* 图片操作按钮 */
.image-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: #71BB39;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #5a9c2a;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #71BB39;
    border: 2px solid #71BB39;
}

.btn-outline:hover {
    background: #71BB39;
    color: white;
}

/* 错误和成功消息 */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
    display: none;
}

.error-message {
    background: #fee;
    color: #c53030;
    border-left: 4px solid #e53e3e;
}

.success-message {
    background: #f0fff4;
    color: #38a169;
    border-left: 4px solid #48bb78;
}

/* 图片放大模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-in-out;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ff6b6b;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.modal-actions .btn {
    padding: 12px 24px;
    font-size: 16px;
}

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

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 企业信息样式 */
.company-info {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    line-height: 1.8;
    color: #444;
}

.company-info h3 {
    color: #71BB39;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .nav-menu {
        margin: -15px -15px 20px -15px;
        padding: 10px 15px;
    }
    
    .nav-menu .nav-item {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    main {
        padding: 20px;
    }
    
    .image-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .example-prompts {
        justify-content: center;
    }
    
    .modal-content {
        padding: 10px;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    #generateBtn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}