/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
}

/* 导航栏样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(45deg, #2980b9, #3498db, #2980b9);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: #34495e;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-auth a {
    color: #fff;
    text-decoration: none;
    background: #3498db;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.nav-auth a:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* 按钮样式 */
.button-group {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

.primary-btn,
.secondary-btn {
    flex: 1;
    padding: 1.2rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.secondary-btn {
    background: #95a5a6;
    color: white;
}

.secondary-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.secondary-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* 底部版权样式 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: #7f8c8d;
}

.footer-content p {
    margin: 0.8rem 0;
    font-size: 0.95rem;
}

.footer-content a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #3498db;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.8rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-menu li {
        flex: 0 0 auto;
    }

    .nav-menu a {
        font-size: 0.95rem;
        white-space: nowrap;
        padding: 0.5rem 0.8rem;
    }

    .nav-auth {
        width: 100%;
        text-align: center;
    }

    .nav-auth a {
        display: block;
        margin: 0 1rem;
    }
}

/* 动画效果 */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 九宫格工具特有样式 */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-container {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f6f8fa 0%, #f1f4f6 100%);
}

.drop-zone:hover {
    border-color: #3498db;
    background: linear-gradient(135deg, #f1f4f6 0%, #e9ecef 100%);
}

.drop-zone.dragover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.upload-icon {
    color: #95a5a6;
    margin-bottom: 1rem;
}

.upload-tip {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.preview-section {
    margin-top: 2rem;
}

.preview-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.preview-grid {
    position: relative;
    width: 100%;
    height: 100%;
}

#previewCanvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.grid-lines::before,
.grid-lines::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

.grid-lines::before {
    left: 33.33%;
    width: 2px;
    height: 100%;
}

.grid-lines::after {
    top: 33.33%;
    width: 100%;
    height: 2px;
}

.control-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f6f8fa 0%, #f1f4f6 100%);
    border-radius: 12px;
}

.size-control {
    margin-bottom: 1.5rem;
}

.size-control select {
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    background: white;
}

.result-section {
    margin-top: 2rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.result-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        padding: 1.5rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .result-grid {
        gap: 0.5rem;
    }

    .control-panel {
        padding: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        margin: 0 0 1rem 0;
    }
}

.usage-count {
    text-align: center;
    color: #7f8c8d;
    margin: 1.5rem 0 3rem;  /* 上1.5rem 左右0 下3rem */
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 添加一个小图标 */
.usage-count::before {
    content: '👥';
    margin-right: 0.5rem;
}

.notice-box {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #fff8e1 0%, #fffdf7 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.1);
    border-left: 4px solid #f39c12;
}

.notice-box h3 {
    color: #f39c12;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.notice-box h3::before {
    content: '📝';
    font-size: 1.5rem;
}

.notice-box ul {
    list-style: none;
    padding: 0;
}

.notice-box li {
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
    min-height: 1.8rem;
}

.notice-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.8;
}

/* 为每个列表项添加不同的图标 */
.notice-box li:nth-child(1)::before {
    content: '①';
    font-size: 1.1rem;
    color: #f39c12;
    line-height: 1.8;
}

.notice-box li:nth-child(2)::before {
    content: '②';
    font-size: 1.1rem;
    color: #f39c12;
    line-height: 1.8;
}

.notice-box li:nth-child(3)::before {
    content: '③';
    font-size: 1.1rem;
    color: #f39c12;
    line-height: 1.8;
}

.notice-box li:nth-child(4)::before {
    content: '④';
    font-size: 1.1rem;
    color: #f39c12;
    line-height: 1.8;
}

/* 添加悬浮效果 */
.notice-box li:hover {
    transform: translateX(5px);
    color: #34495e;
    transition: all 0.3s ease;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .notice-box {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .notice-box li {
        font-size: 1rem;
        padding-left: 2.2rem;  /* 移动端稍微减小左边距 */
    }

    .notice-box li::before {
        font-size: 1.1rem;
        top: 0.15rem;
    }
} 