* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --primary-hover: #357ABD;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #FAFAFA;
    --border-color: #E5E5E5;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --error-color: #FF4D4F;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea {
    font-family: inherit;
    outline: none;
}

/* Header */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

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

.logo a {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.logo a:hover {
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    gap: 32px;
}

.main-nav a {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a:hover::after {
    width: 100%;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

#user-info {
    color: var(--text-light);
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-submit {
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 8px;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-submit:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* Top Banner Ad */
.top-banner-ad {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    margin-top: 60px;
    display: none;
}

.top-banner-ad.active {
    display: block;
}

.ad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.ad-label {
    font-size: 12px;
    color: var(--text-muted);
    padding: 2px 6px;
    background-color: var(--bg-color);
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

.ad-link {
    color: var(--text-color);
    font-size: 14px;
}

.ad-link:hover {
    color: var(--primary-color);
}

.ad-close {
    position: absolute;
    right: 20px;
    background: none;
    font-size: 20px;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.ad-close:hover {
    color: var(--text-color);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 80px 0 60px;
}

.typing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 60px;
}

.typing-text {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    min-height: 40px;
}

.typing-cursor {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.subtitle {
    margin-top: 24px;
}

.subtitle p {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
}

.subtitle p:first-child {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

/* Input Section */
.input-section {
    padding: 40px 0;
}

.input-container {
    max-width: 700px;
    margin: 0 auto;
}

.requirement-input {
    width: 100%;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.requirement-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.requirement-input::placeholder {
    color: var(--text-muted);
}

.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 0 4px;
}

.char-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    padding: 60px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-link {
    font-size: 15px;
    font-weight: 500;
}

/* Popular Section */
.popular-section {
    padding: 60px 0;
}

.popular-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.tab-btn {
    padding: 10px 24px;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.tab-btn:hover:not(.active) {
    background-color: var(--border-color);
}

.popular-list {
    max-width: 800px;
    margin: 0 auto;
}

.popular-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 16px;
    transition: box-shadow var(--transition-fast);
}

.popular-item:hover {
    box-shadow: var(--shadow-md);
}

.popular-item:last-child {
    margin-bottom: 0;
}

.popular-item-content {
    flex: 1;
}

.popular-item-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.popular-item-content p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.popular-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status.pending {
    background-color: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.status.in-progress {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
}

.status.completed {
    background-color: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 280px;
    display: none;
}

.sidebar-section {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.promotion-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promotion-link {
    padding: 10px 12px;
    background-color: var(--bg-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-color);
    transition: all var(--transition-fast);
}

.promotion-link:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.stats-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-section a {
    font-size: 14px;
    color: var(--text-light);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    font-size: 24px;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-tab {
    padding: 12px 0;
    background: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
}

.modal-tab.active {
    color: var(--primary-color);
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-color);
    color: #FFFFFF;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--error-color);
}

.toast.warning {
    background-color: var(--warning-color);
}

/* Responsive Design */
@media (min-width: 1024px) {
    .sidebar {
        display: block;
    }

    .main-content {
        padding-right: 320px;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .header-content {
        padding: 0 24px;
    }

    .main-content {
        padding: 60px 24px;
    }

    .hero-section {
        padding: 60px 0 40px;
    }

    .typing-text {
        font-size: 24px;
    }

    .typing-cursor {
        font-size: 24px;
    }

    .subtitle p {
        font-size: 16px;
    }

    .subtitle p:first-child {
        font-size: 22px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .feature-card {
        padding: 24px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .header-content {
        padding: 0 16px;
    }

    .main-nav {
        display: none;
    }

    .user-area #user-info {
        display: none;
    }

    .main-content {
        padding: 60px 16px 40px;
    }

    .hero-section {
        padding: 40px 0 32px;
    }

    .typing-container {
        padding: 0 16px;
    }

    .typing-text {
        font-size: 20px;
    }

    .typing-cursor {
        font-size: 20px;
    }

    .subtitle p {
        font-size: 15px;
    }

    .subtitle p:first-child {
        font-size: 20px;
    }

    .input-section {
        padding: 24px 0;
    }

    .requirement-input {
        padding: 16px;
        min-height: 100px;
    }

    .btn-submit {
        width: 100%;
        padding: 14px 24px;
    }

    .features-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
    }

    .popular-section {
        padding: 40px 0;
    }

    .popular-tabs {
        gap: 12px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .popular-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .popular-item .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 40px 16px 32px;
    }

    .footer-section {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Loading Spinner */
.btn-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
