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

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1f2937;
    background-color: #ffffff;
    font-weight: 400;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 16px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 16px;
    line-height: 1.5;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: #4b5563;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: #4b5563;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

/* Ad Containers */
.ad-container {
    display: flex;
    justify-content: center;
    margin: 32px 0;
    padding: 16px;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    position: relative;
    z-index: 10;
}

.ad-container.ad-above-fold {
    margin: 16px 0;
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d1d5db;
    background-color: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
}

.ad-slot:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background-color: rgba(102, 126, 234, 0.05);
}

.ad-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    z-index: -1;
}

.ad-728x90 {
    width: 728px;
    height: 90px;
}

.ad-300x250 {
    width: 300px;
    height: 250px;
}

.ad-320x50 {
    width: 320px;
    height: 50px;
}

.ad-160x600 {
    width: 160px;
    height: 600px;
}

/* Ad Content Styling */
.ad-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
}

.ad-content iframe,
.ad-content a {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.ad-content a:hover {
    color: inherit;
    opacity: 0.95;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Ensure ad scripts have proper click zones */
.ad-content script + * {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Make sure iframes are clickable */
.ad-content iframe {
    pointer-events: auto !important;
    cursor: pointer !important;
    border: none;
    background: transparent;
}

/* Improve click target size */
.ad-slot {
    min-height: 250px !important;
    min-width: 300px !important;
    position: relative;
    overflow: visible;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-728x90 {
    min-height: 90px !important;
    min-width: 728px !important;
}

/* Enhanced hover effects for better UX */
.ad-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

/* Make entire ad area clickable */
.ad-content {
    position: relative;
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    pointer-events: auto;
}

/* Visual feedback on click */
.ad-content:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .ad-slot {
        min-height: 260px !important;
        padding: 5px;
        margin: 10px 0;
    }
    
    .ad-content {
        border-radius: 8px;
        overflow: hidden;
    }
    
    /* Larger touch targets on mobile */
    .ad-link {
        padding: 10px;
        margin: -10px;
    }
  
  /* Mobile-specific click enhancements */
  .ad-content {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.1);
  }
  
  .ad-slot {
    touch-action: manipulation !important;
  }
}

/* Standardized Ad Link Styling */
.ad-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer !important;
    position: relative;
    z-index: 10;
}

.ad-link:hover {
    color: inherit;
    opacity: 0.95;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.ad-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.ad-display:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: scale(1.01);
}
/* Popup Ad Support */
.popup-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.popup-ad-container {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.popup-ad-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 10000;
}

.popup-ad-close:hover {
    color: #000;
}

.ad-leaderboard {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(5px);
}

.ad-inline {
    margin: 32px auto;
}

/* Homepage Styles */
.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content-grid {
    padding: 80px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    align-items: start;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: #2563eb;
    margin-bottom: 16px;
}

.card-content p {
    color: #6b7280;
    margin-bottom: 24px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Thing Page Styles */
.thing-article {
    padding: 40px 0;
}

.thing-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.thing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
}

.thing-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: white;
}

.thing-hero .article-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.article-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.article-title {
    color: #2563eb;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.article-date {
    color: #6b7280;
    font-size: 1rem;
}

.article-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.thing-feature {
    margin-bottom: 40px;
}

.thing-title {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 24px;
}

.thing-image-placeholder {
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    height: 300px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #6b7280;
    font-style: italic;
}

.thing-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #374151;
}

.thing-details h3 {
    color: #2563eb;
    margin-top: 32px;
    margin-bottom: 16px;
}

.thing-details ul {
    list-style-type: none;
    padding-left: 0;
}

.thing-details li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.thing-details li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #f97316;
    font-weight: bold;
}

.article-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.related-content {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.related-content h3 {
    color: #2563eb;
    margin-bottom: 16px;
}

.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 8px;
}

.related-list a {
    color: #4b5563;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.related-list a:hover {
    background-color: #e5e7eb;
    color: #2563eb;
}

/* Fact Page Styles */
.fact-page {
    padding: 40px 0;
}

.fact-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.fact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
}

.fact-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: white;
}

.fact-hero .fact-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.fact-header {
    text-align: center;
    margin-bottom: 40px;
}

.fact-title {
    color: #2563eb;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.fact-date {
    color: #6b7280;
    font-size: 1rem;
}

.fact-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    padding: 48px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    position: relative;
}

.fact-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
    border-radius: 16px;
}

.fact-statement {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.fact-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.fact-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.fact-intro {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
}

.fact-explanation {
    margin-bottom: 40px;
}

.fact-section {
    background: white;
    padding: 32px;
    border-left: 4px solid #10b981;
    margin-bottom: 32px;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fact-section h3 {
    color: #059669;
    margin-bottom: 16px;
}

.fact-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    margin-bottom: 40px;
}

.fact-stats {
    background: #f0fdf4;
    padding: 32px;
    border-radius: 12px;
}

.stats-list {
    list-style: none;
}

.stats-list li {
    padding: 12px 0;
    border-bottom: 1px solid #dcfce7;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-list li:last-child {
    border-bottom: none;
}

.stats-list strong {
    color: #059669;
    font-size: 1.25rem;
    min-width: 80px;
}

.fact-trivia h3 {
    color: #2563eb;
    margin-bottom: 24px;
}

.trivia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.trivia-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.trivia-item:hover {
    border-color: #2563eb;
}

.trivia-item h4 {
    color: #2563eb;
    margin-bottom: 8px;
}

.fact-ads-top,
.fact-ads-bottom {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
    flex-wrap: wrap;
}

/* Quote Page Styles */
.quote-page {
    padding: 40px 0;
}

.quote-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.quote-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
}

.quote-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: white;
}

.quote-hero .quote-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.quote-header {
    text-align: center;
    margin-bottom: 48px;
}

.quote-page-title {
    color: #2563eb;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.quote-date {
    color: #6b7280;
    font-size: 1rem;
}

.quote-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.quote-display {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    padding: 48px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    position: relative;
}

.quote-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: -1;
    border-radius: 16px;
}

.main-quote {
    margin: 0;
}

.quote-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: white;
    font-style: italic;
    margin-bottom: 24px;
    position: relative;
}

.quote-text::before {
    content: """;
    font-size: 4rem;
    position: absolute;
    top: -20px;
    left: -30px;
    color: rgba(255, 255, 255, 0.3);
}

.quote-attribution {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quote-author {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.quote-context {
    font-size: 0.9rem;
    opacity: 0.8;
}

.quote-analysis h2 {
    color: #2563eb;
    margin-bottom: 24px;
}

.quote-analysis p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 32px;
}

.quote-breakdown h3 {
    color: #2563eb;
    margin-bottom: 24px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.insight-item {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #f97316;
}

.insight-item h4 {
    color: #f97316;
    margin-bottom: 12px;
}

.insight-item p {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.quote-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.author-info {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.author-info h3 {
    color: #2563eb;
    margin-bottom: 16px;
}

.author-bio {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

.author-achievements {
    list-style: none;
}

.author-achievements li {
    padding: 4px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.related-quotes {
    background: #fffbeb;
    padding: 24px;
    border-radius: 12px;
}

.related-quotes h3 {
    color: #f97316;
    margin-bottom: 16px;
}

.mini-quote {
    margin-bottom: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #f97316;
}

.mini-quote p {
    font-size: 0.9rem;
    font-style: italic;
    color: #374151;
    margin-bottom: 8px;
}

.mini-quote cite {
    font-size: 0.8rem;
    color: #f97316;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 32px 0;
    position: sticky;
    bottom: 0;
    margin-top: auto;
}

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

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: #d1d5db;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: white;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Content Refresh Button */
.refresh-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin: 24px auto;
    display: block;
}

.refresh-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ad-728x90 {
        width: 100%;
        max-width: 728px;
    }
    
    .article-layout,
    .quote-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .article-sidebar,
    .quote-sidebar {
        position: static;
    }
    
    .fact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        gap: 0;
        padding: 24px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .ad-300x250 {
        width: 100%;
        max-width: 300px;
        min-height: 250px;
    }
    
    .ad-320x50 {
        width: 100%;
        max-width: 320px;
        min-height: 50px;
    }
    
    .popup-ad-container {
        margin: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
    }
    
    .fact-highlight {
        padding: 32px 24px;
    }
    
    .fact-statement {
        font-size: 1.75rem;
    }
    
    .quote-display {
        padding: 32px 24px;
    }
    
    .quote-text {
        font-size: 1.25rem;
    }
    
    .quote-text::before {
        font-size: 3rem;
        top: -15px;
        left: -20px;
    }
    
    .insights-grid,
    .trivia-grid {
        grid-template-columns: 1fr;
    }
    
    .fact-ads-top,
    .fact-ads-bottom {
        flex-direction: column;
        align-items: center;
    }
    
    .footer .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero {
        padding: 60px 0;
    }
    
    .content-grid {
        padding: 60px 0;
    }
    
    .card {
        padding: 24px;
    }
    
    .thing-article,
    .fact-page,
    .quote-page {
        padding: 24px 0;
    }
    
    .fact-section,
    .author-info,
    .related-quotes {
        padding: 20px;
    }
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.btn:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .ad-container {
        display: none;
    }
    
    .main {
        margin-top: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}