:root {
    --primary-color: #e48fd8;
    --secondary-color: #9c64d6;
    --gradient: linear-gradient(45deg, #e48fd8, #9c64d6);
    --light-bg: #fdf4f9;
    --dark-text: #333333;
    --light-text: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(228, 143, 216, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #fcfcfc;
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 1000px; /* 固定宽度（替换原来的max-width） */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box; /* 确保padding包含在总宽度内 */
}

/* Header Styles */
header {
    background: var(--gradient);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.button {
    background: white;
    color: var(--secondary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button.primary {
    background: var(--light-bg);
    color: var(--secondary-color);
}
/* 禁用状态 - 针对主要按钮 */
.button.primary:disabled {
    background: #d3b1e0; /* 更浅的紫色 */
    color: white;
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 加载状态 - 针对主要按钮 */
.button.primary.loading {
    position: relative;
    pointer-events: none;
    background: #d3b1e0; /* 与禁用状态一致 */
    color: white;
}

.button.primary.loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white; /* 旋转指示器颜色改为白色 */
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Main Content */
main {
    padding: 40px 0;
    flex: 1;
}

.workspace {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.sidebar-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--light-bg);
    color: var(--secondary-color);
}

/* Content Area */
.content-area {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    min-height: 60vh; /* 视窗高度的60% */
    position: relative;
}



.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Creation Form */
.creation-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

textarea {
    height: 120px;
    resize: vertical;
}

/* Platform Selector */
.platform-selector {
    display: flex;
    gap: 15px;
    margin: 40px 0 30px 0;
}

.platform-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: var(--border-radius);
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.platform-option:hover, .platform-option.active {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
}

.platform-option img {
    height: 40px;
    margin-bottom: 10px;
}

/* Output Section */
.output-section {
    margin-top: 30px;
}

.output-container {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    min-height: 300px;
}

.output-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.template-card {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.template-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.template-tag {
    background-color: var(--light-bg);
    color: var(--secondary-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Style Options */
.style-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.style-option {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-option:hover, .style-option.active {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-title {
    font-size: 32px;
    margin-bottom: 40px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.form-group {
    width: 100%;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 500;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(228, 143, 216, 0.1);
    outline: none;
}

.auth-form .button {
    margin-top: 40px;
    margin-bottom: 0;
    padding: 12px 40px;
    font-weight: 600;
    font-size: 18px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 240px;
    letter-spacing: 1px;
}

.auth-form .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(228, 143, 216, 0.3);
}

.auth-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
    width: 100%;
}

.auth-link a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 16px;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 400px; /* 固定最小高度 */
    width: 100%; /* 固定宽度与父容器相同 */
    position: relative; /* 为绝对定位的空状态提供锚点 */
}

.history-item {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: var(--shadow);
}

.history-item h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.history-item .date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.history-item .preview {
    color: #666;
    margin-bottom: 10px;
}

.history-item .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .creation-form {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-container {
        margin: 30px auto;
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .auth-form {
        max-width: 100%;
    }
    
    .auth-form .button {
        max-width: 200px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background-color: var(--light-bg);
    padding: 30px 0;
    margin-top: auto;
    text-align: center;
    position: relative;
    width: 100%;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.footer-content p {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 70%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.modal-textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
}

/* 淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.success-message {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 验证码输入组样式 */
.verification-code-group {
    display: flex;
    gap: 10px;
}

.verification-code-group input {
    flex: 1;
}

.verification-code-group .button {
    white-space: nowrap;
    padding: 12px 20px;
}

/* 禁用状态 */
.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 倒计时样式 */
.countdown {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
} 