/* Toast 样式 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 400px;
    z-index: 9999;
}
.toast {
    background-color: #fff;
    color: #333;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #4CAF50;
}
.toast.success { 
    border-left-color: #4CAF50; 
    background: linear-gradient(135deg, #f0f9f0 0%, #ffffff 100%);
}
.toast.error { 
    border-left-color: #F44336; 
    background: linear-gradient(135deg, #fdf2f2 0%, #ffffff 100%);
}
.toast-icon { 
    margin-right: 12px; 
    font-size: 18px; 
    font-weight: bold;
}
.toast.success .toast-icon { color: #4CAF50; }
.toast.error .toast-icon { color: #F44336; }
.toast-message { 
    flex-grow: 1; 
    font-size: 14px;
    line-height: 1.4;
}
@keyframes toast-in {
    from { 
        transform: translateY(-20px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

/* 主容器样式 */
.generate-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 50%, #004494 100%);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.generate-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.08"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
    pointer-events: none;
}

.generate-box {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    box-shadow: 
        0 32px 64px rgba(0, 123, 255, 0.15),
        0 16px 32px rgba(0, 86, 179, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    width: 100%;
    max-width: 680px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 头部样式 */
.header-section {
    margin-bottom: 40px;
}

.icon-wrapper {
    margin-bottom: 24px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.generate-box h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.main-title {
    font-size: 20px;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 16px 0;
}

.subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* 输入区域样式 */
.input-section {
    margin-bottom: 32px;
    text-align: left;
}

.input-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.required {
    color: #e53e3e;
    margin-left: 4px;
    font-weight: 500;
}

.input-area {
    position: relative;
}

.prompt-textarea {
    width: 100%;
    min-height: 160px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2d3748;
}

.prompt-textarea::placeholder {
    color: #a0aec0;
    font-size: 15px;
    line-height: 1.5;
}

.prompt-textarea:focus {
    border-color: #007bff;
    box-shadow: 
        0 0 0 3px rgba(0, 123, 255, 0.1),
        0 4px 12px rgba(0, 123, 255, 0.05);
    outline: none;
    background: #ffffff;
}

.input-tip {
    display: flex;
    align-items: flex-start;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.input-tip svg {
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

.input-tip span {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.4;
}

/* 按钮样式 */
.generate-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 24px rgba(0, 123, 255, 0.25),
        0 4px 12px rgba(0, 123, 255, 0.15);
    letter-spacing: 0.5px;
}

.generate-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-button:hover::before {
    left: 100%;
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(0, 123, 255, 0.3),
        0 8px 16px rgba(0, 123, 255, 0.2);
}

.generate-button:active {
    transform: translateY(0px);
}

.generate-button:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(160, 174, 192, 0.2);
}

.generate-button:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(160, 174, 192, 0.2);
}

.spinner-icon {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 12px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .generate-container {
        padding: 20px 16px;
    }
    
    .generate-box {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .generate-box h2 {
        font-size: 28px;
    }
    
    .main-title {
        font-size: 18px;
    }
    
    .subtitle {
        font-size: 15px;
    }
    
    .prompt-textarea {
        min-height: 140px;
        padding: 16px;
        font-size: 15px;
    }
    
    .generate-button {
        padding: 16px 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .generate-box {
        padding: 24px 20px;
    }
    
    .icon-wrapper svg {
        width: 50px;
        height: 50px;
    }
    
    .generate-box h2 {
        font-size: 24px;
    }
    
    .main-title {
        font-size: 16px;
    }
}