/* Office Tips - Excel 2019 Theme */
:root {
    --excel-green: #217346;
    --excel-green-light: #33A867;
    --excel-green-dark: #185C37;
    --excel-green-bg: #E8F5E9;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #999;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: var(--excel-green);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--excel-green-dark);
}

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--excel-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: var(--excel-green);
    border-bottom-color: var(--excel-green);
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Search Box */
.search-box {
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-left: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--excel-green);
    box-shadow: 0 0 0 3px rgba(33, 115, 70, 0.1);
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* Categories Grid */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: var(--excel-green-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.category-card .count {
    font-size: 0.85rem;
    color: var(--excel-green);
    font-weight: 500;
}

/* Tips List */
.tips-list {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.tips-list h2 {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.tip-item:last-child {
    border-bottom: none;
}

.tip-item:hover {
    background: var(--excel-green-bg);
}

.tip-number {
    width: 32px;
    height: 32px;
    background: var(--excel-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.tip-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tip-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Article Page */
.article {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.article h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--excel-green-bg);
}

.article-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Keyboard Shortcut Styling */
kbd {
    background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    box-shadow: 0 2px 0 #999;
    margin: 0 0.1rem;
}

/* Table Styling */
.shortcut-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.shortcut-table th,
.shortcut-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.shortcut-table th {
    background: var(--excel-green);
    color: white;
    font-weight: 600;
}

.shortcut-table tr:hover {
    background: var(--excel-green-bg);
}

.shortcut-table td:first-child {
    white-space: nowrap;
}

/* Tip Box */
.tip-box {
    background: var(--excel-green-bg);
    border-left: 4px solid var(--excel-green);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.tip-box strong {
    color: var(--excel-green-dark);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

/* Newsletter Box */
.newsletter-box {
    background: linear-gradient(135deg, var(--excel-green) 0%, var(--excel-green-dark) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.newsletter-box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.newsletter-box p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-form button {
    background: white;
    color: var(--excel-green);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.newsletter-form button:hover {
    transform: scale(1.05);
}

.newsletter-box small {
    display: block;
    margin-top: 0.75rem;
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Comments Section */
.comments-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-top: 2rem;
}

.comments-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.no-comments {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

.comments-list {
    margin-bottom: 1.5rem;
}

.comment {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.comment p {
    color: var(--text-secondary);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-form .form-row {
    display: flex;
    gap: 0.75rem;
}

.comment-form input,
.comment-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.comment-form input {
    flex: 1;
}

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

.comment-form button {
    align-self: flex-start;
    background: var(--excel-green);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: var(--excel-green-dark);
}

/* Downloads Page */
.page-header {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: 16px;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.downloads-grid {
    margin-bottom: 2.5rem;
}

.downloads-grid h2 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--excel-green-bg);
}

.section-desc {
    color: var(--text-secondary);
    margin-top: -0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.download-card {
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: var(--excel-green-light);
}

.download-card.premium {
    border-color: var(--excel-green);
    background: #fafffe;
}

.premium-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--excel-green);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-icon {
    width: 60px;
    height: 60px;
    background: var(--excel-green-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

.download-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.download-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    min-height: 2.5em;
}

.download-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.download-size,
.download-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.download-count {
    color: var(--excel-green);
}

.download-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--excel-green);
}

.download-btn {
    display: inline-block;
    background: var(--excel-green);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.download-btn:hover {
    background: var(--excel-green-dark);
    color: white;
}

.premium-btn {
    background: #e0e0e0;
    color: #666;
}

.premium-btn:hover {
    background: #d0d0d0;
    color: #666;
}

.premium-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid var(--excel-green-bg);
}

.premium-section h2 {
    color: var(--excel-green-dark);
}

/* Affiliate Box */
.affiliate-box {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.affiliate-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b00;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.affiliate-img {
    max-width: 120px;
    margin: 1rem auto;
}

.affiliate-icon {
    font-size: 3rem;
    margin: 0.5rem 0;
}

.affiliate-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.affiliate-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.affiliate-features {
    text-align: left;
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.affiliate-features li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.affiliate-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--excel-green);
}

.affiliate-btn {
    display: inline-block;
    background: #ff6b00;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.affiliate-btn:hover {
    background: #e65c00;
    color: white;
}

/* Ad Container */
.ad-container {
    background: var(--bg-light);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    margin: 1.5rem 0;
    min-height: 100px;
}

.sidebar-ads {
    width: 300px;
    flex-shrink: 0;
}

/* Article Layout with Sidebar */
.article-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.article-main {
    flex: 1;
    min-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .main {
        padding: 1rem;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .article {
        padding: 1.5rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .comment-form .form-row {
        flex-direction: column;
    }

    .download-cards {
        grid-template-columns: 1fr;
    }

    .article-layout {
        flex-direction: column;
    }

    .sidebar-ads {
        width: 100%;
    }
}
