* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --background-color: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--secondary-color);
}

/* 导航栏样式 */
.header {
    background-color: #fff;
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    padding: 0.8rem 0;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    margin-right: 3rem;
}

.nav-logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-logo a:hover {
    color: var(--primary-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
}

.mobile-menu-btn {
    display: none;  /* PC端隐藏移动菜单按钮 */
}

.mobile-nav-right {
    display: none;  /* PC端隐藏移动端右侧按钮 */
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

.login-btn, .register-btn {
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.login-btn {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.register-btn {
    background-color: var(--primary-color);
    color: white;
}

.login-btn:hover {
    background-color: rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

.register-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1002;
        border-bottom: 1px solid #eee;
    }

    .nav {
        padding: 0;
    }

    .nav-content {
        height: 60px;
        display: flex;
        align-items: center;
        padding: 0 15px;
        justify-content: space-between;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: none;
        color: #333;
        padding: 8px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:hover {
        background: #f5f5f5;
    }

    .mobile-menu-btn svg {
        width: 24px;
        height: 24px;
        transition: transform 0.3s ease;
    }

    .mobile-menu-btn.active svg {
        transform: rotate(90deg);
    }

    .nav-logo {
        margin: 0;
    }

    .nav-logo a {
        font-size: 16px;
        font-weight: 500;
        color: #333;
        gap: 8px;
    }

    .nav-logo img {
        width: 24px;
        height: 24px;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        padding: 20px 0 100px;
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        height: calc(100vh - 60px);
    }

    .nav-menu.active {
        display: block;
        transform: translateX(0);
    }

    .nav-menu ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
        height: auto;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu li a {
        padding: 15px 20px;
        display: flex;
        align-items: center;
        color: #333;
        font-size: 16px;
        font-weight: 500;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    .nav-menu li a:hover {
        color: var(--primary-color);
        background: #f8f9fa;
    }

    .mobile-nav-right {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px;
        margin: 20px 0;
        border-top: 8px solid #f5f5f5;
        position: relative;
    }

    .mobile-nav-right .login-btn,
    .mobile-nav-right .register-btn {
        width: 100%;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 500;
        border-radius: 8px;
        padding: 0;
    }

    .mobile-nav-right .login-btn {
        background: #f8f9fa;
        color: var(--primary-color);
        border: 1px solid var(--primary-color);
    }

    .mobile-nav-right .register-btn {
        background: var(--primary-color);
        color: #fff;
    }

    .nav-right {
        display: none;
    }

    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    body.menu-open .nav-menu {
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom);
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    body.menu-open::before {
        opacity: 1;
    }

    .container {
        margin-top: 60px;
        padding: 20px 15px;
        min-height: calc(100vh - 60px);
    }

    .footer {
        margin-top: auto;
        position: relative;
        z-index: 1;
    }
}

/* 主要内容区样式 */
.container {
    max-width: 1200px;
    margin: 7rem auto 3rem;
    padding: 0 2rem;
    flex: 1;
}

.tool-container {
    background-color: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 0 auto;
    max-width: 800px;
}

h1 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.usage-count {
    text-align: center;
    margin-bottom: 3rem;
    color: #666;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f6f8fa, #fff);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.usage-number {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0.8rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 上传区域样式 */
.upload-container {
    max-width: 700px;
    margin: 0 auto;
}

.drop-zone {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, #f8f9fa, #fff);
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0));
    opacity: 0;
    transition: var(--transition);
}

.drop-zone:hover {
    transform: translateY(-2px);
    border-color: var(--primary-dark);
}

.drop-zone:hover::before {
    opacity: 1;
}

.drop-zone .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.drop-zone p {
    font-size: 1.3rem;
    color: #666;
    margin-top: 1rem;
}

/* 设置区域样式 */
.settings {
    margin: 3rem auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    padding: 2rem 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 700px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 280px;
}

.setting-item label {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    white-space: nowrap;
}

select {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid #e1e8ed;
    font-size: 1.1rem;
    background-color: white;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    min-width: 120px;
}

select:hover, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

/* 按钮样式 */
button {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

button:not(:disabled)::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.5s;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

button:hover:not(:disabled)::after {
    left: 100%;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 进度条样式 */
.progress-container {
    margin: 3rem auto;
    max-width: 600px;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #e1e8ed;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    transition: width 0.3s ease;
    position: relative;
}

.progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress::after {
    content: attr(data-progress) '%';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.progress-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

.progress-status::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(74, 144, 226, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0);
    }
}

/* 结果区域样式 */
.result-container {
    margin: 3rem auto;
    padding: 2.5rem;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: var(--border-radius);
    max-width: 600px;
    box-shadow: var(--box-shadow);
}

.result-container h3 {
    font-size: 1.8rem;
    color: var(--success-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.file-info {
    margin: 1.5rem 0;
    font-size: 1.1rem;
}

.file-info p {
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.file-info p:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 广告位样式 */
.ad-section {
    margin: 4rem auto 0;
    padding: 2rem;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: var(--border-radius);
    max-width: 800px;
    box-shadow: var(--box-shadow);
}

.ad-wrapper {
    width: 100%;
    min-height: 250px;
    background: linear-gradient(45deg, #f1f3f5, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.ad-placeholder {
    color: #adb5bd;
    font-size: 1.4rem;
    font-weight: 500;
}

/* 底部版权样式 */
.footer {
    background: linear-gradient(to right, var(--secondary-color), #34495e);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.footer-content p {
    margin: 0.8rem 0;
    opacity: 0.9;
}

.footer-content a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-content a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .settings {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        min-width: auto;
    }

    .setting-item label {
        min-width: auto;
        margin-bottom: 0.3rem;
    }

    select {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }
}
 