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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
}

/* Header Styles */
header {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

/* Free Badge */
.free-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.4);
    letter-spacing: 0.5px;
    animation: fadeIn 0.5s ease-in;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Header Description */
.header-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation / Search Bar */
nav {
    margin-bottom: 30px;
}

#searchBox {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

#searchBox:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Main Content Container */
main {
    background: transparent;
}

/* Citation Block Styles */
.citation-block {
    background: white;
    padding: 35px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.citation-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
}

.citation-block h2 {
    margin-bottom: 25px;
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Citation Grid Layout */
.citation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

/* Individual Citation Style Card */
.citation-style {
    padding: 25px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.citation-style:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.citation-style h3 {
    color: #333;
    margin-bottom: 18px;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Format Box */
.format-box {
    background: white;
    padding: 18px;
    border-left: 4px solid #667eea;
    margin-bottom: 18px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.format {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

/* Example Text */
.example {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 6px;
}

.example strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* Copy Button */
.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
}

/* Affiliate CTA Styles */
.affiliate-cta {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 50px 0;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
}

.affiliate-cta h3 {
    font-size: 1.9rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.affiliate-cta p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.7;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #f5576c;
    padding: 16px 45px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.disclaimer {
    font-size: 0.85rem;
    margin-top: 15px;
    opacity: 0.85;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    margin-top: 50px;
    border-top: 2px solid #e0e0e0;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header {
        padding: 35px 15px;
    }

    .free-badge {
        font-size: 0.9rem;
        padding: 8px 20px;
    }

    header h1 {
        font-size: 1.9rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .header-description {
        font-size: 0.9rem;
        padding: 0 20px;
    }

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

    .citation-block {
        padding: 25px 20px;
    }

    .citation-block h2 {
        font-size: 1.5rem;
    }

    #searchBox {
        font-size: 1rem;
        padding: 14px 16px;
    }

    .affiliate-cta {
        padding: 30px 20px;
    }

    .affiliate-cta h3 {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 14px 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }

    .citation-block h2 {
        font-size: 1.3rem;
    }

    .citation-style {
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        max-width: 100%;
    }

    header {
        background: white;
        color: #333;
    }

    .free-badge {
        background: #ddd;
        color: #333;
    }

    .affiliate-cta {
        display: none;
    }

    .copy-btn {
        display: none;
    }

    #searchBox {
        display: none;
    }
}

/* Animation for filtered content */
.citation-block {
    animation: fadeIn 0.3s ease-in;
}

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

/* Hidden state for filtered content */
.citation-block.hidden {
    display: none;
}
