/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 二维码浮窗样式 */
.qr-float {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.qr-float-content {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.qr-image {
    width: 120px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
}

.qr-text {
    margin-bottom: 8px;
    font-size: 14px;
    color: #000000;
    font-weight: 700;
}
.qr-feedback {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.qr-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0071e3;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-toggle:hover {
    background-color: #0077ed;
}

.toggle-icon {
    position: relative;
    width: 12px;
    height: 12px;
}

.toggle-icon:before,
.toggle-icon:after {
    content: '';
    position: absolute;
    background-color: white;
    transition: transform 0.3s ease;
}

.toggle-icon:before {
    width: 12px;
    height: 2px;
    top: 5px;
    left: 0;
}

.toggle-icon:after {
    width: 2px;
    height: 12px;
    top: 0;
    left: 5px;
}

.qr-float.collapsed .qr-float-content {
    transform: translateX(calc(100% + 14px));
    opacity: 0;
    pointer-events: none;
}

.qr-float.collapsed .toggle-icon:after {
    transform: rotate(90deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .qr-float {
        top: auto;
        bottom: 20px;
        right: 20px;
    }
    
    .qr-image {
        width: 100px;
        height: 100px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background-color: #f5f5f7;
    transition: background-color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header h1 {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.form-group input,
.form-group textarea,
.form-group label,
.generate-btn,
.upload-btn,
.download-btn {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

/* 顶部标题区域 */
.header {
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.title-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.title-text {
    text-align: left;
}

.title-text h1 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.3;
}

.title-text p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.header h1 {
    color: #1d1d1f;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* 提示条样式 - 现在位于标题区域右侧 */
.notification-container {
    flex-shrink: 0;
    max-width: 450px;
}

.notification-content {
    background-color: #f8f9fa; /* 更简洁的浅灰色背景 */
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px; /* 调大字号 */
    color: #4b5563;
    position: relative;
}

.notification-content span {
    font-weight: 500;
    white-space: nowrap;
}

.notification-content span:before {
    content: "🏆";
    margin-right: 6px;
}

.notification-content a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 14px;
    background-color: #0071e3; /* 苹果蓝色 */
    border-radius: 30px; /* 使按钮更圆 */
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px; /* 匹配提示条字号 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.notification-content a:hover {
    background-color: #0077ed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .notification-container {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .notification-content {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 10px 15px;
    }
    
    .notification-content a {
        margin-bottom: 4px;
    }
}

/* 主要内容区域 */
.main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* 表单区域 */
.form-section {
    flex: 1;
    min-width: 300px;
}

.logo-form {
    position: relative;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    background-color: #fff;
}

.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.generate-btn, .upload-btn {
    width: 100%;
    padding: 1rem;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.generate-btn {
    background-color: #0071e3;
}

.generate-btn:hover {
    background-color: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.upload-btn {
    background-color: rgba(0, 0, 0, 0.8);
}

.upload-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮禁用状态样式 */
.button-disabled,
.generate-btn:disabled,
.upload-btn:disabled,
.download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.generate-btn.button-disabled:hover,
.upload-btn.button-disabled:hover,
.download-btn.button-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Logo展示区域 */
.logo-section {
    flex: 1;
    min-width: 300px;
}

.logo-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.logo-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.logo-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.download-btn {
    padding: 0.75rem 1.5rem;
    background-color: #0071e3;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    background-color: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.logo-image {
    max-width: 100%;
    height: auto;
}

/* Model Selector Styles */
.model-select-container {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    z-index: 1;
}

.model-select-container label {
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
    font-weight: 400;
    white-space: nowrap;
}

.model-select-container select {
    width: auto;
    font-size: 14px;
    padding: 0.3rem 2rem 0.3rem 0.6rem;
    background-position: right 0.3rem center;
    background-size: 1.2em 1.2em;
    background-color: #f5f5f7;
}

/* 加载动画 */
.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(0, 113, 227, 0.2);
    border-top: 6px solid #0071e3;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -40px;
    margin-top: -40px;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 10;
}

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

/* 底部信息区域 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    color: #999;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
    font-size: 0.75rem;
}

.footer a {
    color: #666;
    text-decoration: none;
    margin: 0 0.25rem;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #333;
    text-decoration: none;
}

/* 调整主要内容区域，为固定页脚留出空间 */
.main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem 4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* 统一Logo展示区域和表单区域的最小高度 */
.logo-container, .logo-form {
    min-height: 500px;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.logo-container:hover, .logo-form:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.06);
}

/* 等待状态提示 */
.logo-container .waiting-message {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #8e8e93;
    font-size: 1.1rem;
    text-align: center;
}

.waiting-message .waiting-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #c7c7cc;
}

/* 错误提示弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 2rem;
    position: relative;
    max-width: 500px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-info {
    font-size: 0.85rem;
    padding: 1rem 0 0;
    margin-top: 1rem;
    border-top: 1px solid #eee;
    color: #0071e3 !important;
    position: relative;
    cursor: pointer;
    text-decoration: underline;
}

.contact-info:hover::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 10px);
    width: 200px;
    height: 270px;
    background-image: url('assets/QR.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.close-btn {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #1d1d1f;
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close-btn:hover {
    color: #333;
}

.modal h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.modal p {
    color: #666;
    line-height: 1.5;
}

/* Toast提示样式 */
.toast-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }

    .form-section,
    .logo-section {
        width: 100%;
    }
    
    .toast-message {
        width: 90%;
        text-align: center;
    }
}

/* 图标尺寸预览区域 */
.sizes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.size-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.size-item img {
    display: block;
    margin: 0 auto 0.5rem;
    max-width: 100%;
    height: auto;
}

.size-item p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.size-item button {
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.size-item button:hover {
    background-color: #2980b9;
}

.logo-image {
    max-width: 100%;
    height: auto;
}
