/* Base Styles Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Ad Banner Styles */
.ad-banner {
    background: var(--card-bg);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-ad {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 10px;
}

.ad-content {
    background: var(--card-bg);
    padding: 20px;
    margin: 20px auto;
    max-width: 728px;
    text-align: center;
    border-radius: 8px;
}

/* Main Content Area */
.main {
    padding: 30px 0;
}

.section {
    padding: 40px 0;
}

.section-alt {
    background: white;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

/* News Grid */
.news-grid, .tools-grid, .tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-content {
    padding: 12px;
}

.card-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

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

.card-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.card-source {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tool Card Special Styles */
.tool-card {
    position: relative;
}

.tool-card .card-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.tool-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.tool-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.tool-btn:hover {
    background: var(--primary-dark);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Footer Styles */
.footer {
    background: #1f2937;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p, .footer-section a {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-section a {
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #6b7280;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .news-grid, .tools-grid, .tutorials-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-ad {
        display: none;
    }
}

/* Animation Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* ========== Monetization Module Styles ========== */

/* Top Announcement Bar */
.announcement-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.vip-link {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 15px;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.vip-link:hover {
    background: rgba(255,255,255,0.3);
}

/* VIP Button */
.vip-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    font-weight: bold;
}

/* Ad Placeholder */
.ad-placeholder {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 30px;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ad-placeholder span {
    font-size: 1rem;
    color: #6b7280;
}

.ad-placeholder small {
    font-size: 0.8rem;
    color: #9ca3af;
}

.ad-inline {
    padding: 20px;
    margin: 20px auto;
    max-width: 728px;
}

/* VIP Membership Section */
.vip-section {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.vip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.vip-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s;
}

.vip-card:hover {
    transform: translateY(-5px);
}

.vip-card.featured {
    border: 3px solid #f59e0b;
    transform: scale(1.05);
}

.vip-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.vip-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.vip-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.vip-card .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.vip-card .price span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: normal;
}

.vip-features {
    list-style: none;
    text-align: left;
    margin-bottom: 25px;
}

.vip-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}

.vip-btn-free, .vip-btn-pay, .vip-btn-enterprise {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.vip-btn-free {
    background: #e5e7eb;
    color: #6b7280;
}

.vip-btn-pay {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.vip-btn-pay:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.vip-btn-enterprise {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

/* Resource Download Section */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.download-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.download-card:hover {
    transform: translateY(-3px);
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.download-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.download-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.download-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    text-align: center;
}

.download-btn:hover {
    background: var(--primary-dark);
}

/* Donation Section */
.donate-desc {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.donate-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.donate-card {
    text-align: center;
}

.donate-card-link {
    text-decoration: none;
}

.donate-card .donate-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.donate-card p {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
}

.donate-card .donate-tip {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* Partnership & Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.contact-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1rem !important;
    margin: 15px 0 !important;
}

.contact-card button {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-card button:hover {
    background: var(--primary-dark);
}

/* Floating Toolbar */
.floating-toolbar {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.toolbar-btn {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.toolbar-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.toolbar-btn.vip {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
}

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

.modal-content h2 {
    margin-bottom: 20px;
}

.pay-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.pay-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.pay-btn.wechat {
    background: #07c160;
    color: white;
}

.pay-btn.alipay {
    background: #1677ff;
    color: white;
}

.pay-btn:hover {
    transform: scale(1.02);
}

.pay-note {
    color: var(--text-light);
    font-size: 0.85rem;
}

.contact-info {
    text-align: left;
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.contact-info p {
    margin: 10px 0;
}

.contact-tip {
    color: var(--primary-color);
    font-weight: bold;
}

/* Load More Button */
.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more button {
    padding: 12px 30px;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.load-more button:hover {
    background: var(--primary-color);
    color: white;
}

/* Responsive Supplement */
@media (max-width: 768px) {
    .announcement-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .vip-card.featured {
        transform: scale(1);
    }
    
    .floating-toolbar {
        right: 10px;
        bottom: 80px;
    }
    
    .toolbar-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .donate-grid {
        gap: 20px;
    }
}

/* Payment Success Modal */
.payment-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.payment-success-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

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

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.payment-success-content h2 {
    color: #10b981;
    margin-bottom: 15px;
}

.payment-success-content p {
    color: #666;
    margin-bottom: 10px;
}

.payment-success-content button {
    margin-top: 20px;
    padding: 12px 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.payment-success-content button:hover {
    transform: scale(1.05);
}

/* User email in nav */
.user-email {
    color: white;
    font-weight: 500;
    padding: 8px 16px;
}

/* VIP active banner */
.vip-active-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.vip-active-banner h3 {
    color: #92400e;
    margin-bottom: 10px;
}

.vip-active-banner p {
    color: #78350f;
}
