.subreddit-analyzer-form {
    max-width: 800px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subreddit-analyzer-form .form-group {
    margin-bottom: 1.5em;
}

.subreddit-analyzer-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #333;
}

.subreddit-analyzer-form input[type="text"] {
    width: 100%;
    padding: 0.8em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.subreddit-analyzer-form button {
    width: 100%;
    padding: 1em;
    background: #e53c11;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subreddit-analyzer-form button:hover {
    background: #005177;
}

.subreddit-analyzer-results {
    margin-top: 2em;
    padding: 1.5em;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.subreddit-analyzer-results h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 0.5em;
}

.subreddit-analyzer-results h4 {
    color: #444;
    margin: 1.5em 0 0.5em;
}

/* Heatmap styles */
.heatmap {
    margin: 1em 0;
    padding: 1em;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    position: relative;
}

.heatmap-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 1em;
    color: #333;
    text-align: center;
}

/* Time labels row */
.time-labels {
    display: grid;
    grid-template-columns: 60px repeat(12, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    font-size: 0.7em;
    color: #666;
}

.time-label-spacer {
    /* Empty space above day labels */
}

.time-label {
    text-align: center;
    padding: 2px;
    font-weight: 500;
}

/* Combined heatmap grid */
.combined-heatmap {
    display: grid;
    grid-template-columns: 60px repeat(12, 1fr);
    gap: 2px;
    max-width: 100%;
}

.day-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
    color: #333;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 4px;
    text-align: center;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6em;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    min-height: 20px;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    margin-top: 1em;
    gap: 1em;
    font-size: 0.8em;
    color: #666;
    flex-wrap: wrap;
}

.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.heatmap-legend-color {
    width: 1em;
    height: 1em;
    border-radius: 2px;
}

.intensity-0 { background-color: #ebedf0; color: #666; }
.intensity-1 { background-color: #9be9a8; }
.intensity-2 { background-color: #40c463; }
.intensity-3 { background-color: #30a14e; }
.intensity-4 { background-color: #216e39; }

/* Heatmap watermark */
.heatmap-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 5;
    letter-spacing: 0.5px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .heatmap {
        padding: 0.5em;
        margin: 0.5em 0;
    }
    
    .heatmap-watermark {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
        letter-spacing: 0.3px;
    }
    
    .time-labels {
        grid-template-columns: 50px repeat(12, 1fr);
        font-size: 0.6em;
    }
    
    .combined-heatmap {
        grid-template-columns: 50px repeat(12, 1fr);
        gap: 1px;
    }
    
    .day-label {
        font-size: 0.7em;
        padding: 2px;
    }
    
    .heatmap-cell {
        min-height: 16px;
        font-size: 0.5em;
    }
    
    .time-label {
        padding: 1px;
        font-size: 0.6em;
    }
    
    .heatmap-legend {
        gap: 0.5em;
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .time-labels {
        grid-template-columns: 40px repeat(12, 1fr);
        font-size: 0.55em;
    }
    
    .heatmap-watermark {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
        letter-spacing: 0.2px;
    }
    
    .combined-heatmap {
        grid-template-columns: 40px repeat(12, 1fr);
    }
    
    .day-label {
        font-size: 0.6em;
        padding: 1px;
    }
    
    .heatmap-cell {
        min-height: 14px;
    }
    
    .time-label {
        font-size: 0.5em;
    }
}

.subreddit-analyzer-loading {
    text-align: center;
    padding: 2em;
}

.subreddit-analyzer-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e53c11;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.subreddit-analyzer-error {
    margin-top: 1em;
    padding: 1em;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* reCAPTCHA container */
.g-recaptcha {
    margin-bottom: 1em;
    text-align: center;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

/* 3-card grid for Additional Insights */
.bento-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

/* 5-card grid for Additional Insights */
.bento-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    width: 100%;
}

.bento-grid + h4 {
    margin-top: 2rem;
}

.bento-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 140px;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.bento-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.bento-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.bento-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bento-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0.2rem 0;
}

.bento-description {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.2rem;
}

/* Smaller font sizes for Additional Insights (20% reduction) */
.bento-grid-5 .bento-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.2rem; /* Reduced from 1.5rem */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 112px; /* Reduced from 140px */
    width: 100%;
    box-sizing: border-box;
}

.bento-grid-5 .bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.bento-grid-5 .bento-icon {
    font-size: 2rem; /* Reduced from 2.5rem */
    margin-bottom: 0.64rem; /* Reduced from 0.8rem */
    opacity: 0.8;
}

.bento-grid-5 .bento-title {
    font-size: 0.72rem; /* Reduced from 0.9rem */
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.4px; /* Reduced from 0.5px */
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.bento-grid-5 .bento-value {
    font-size: 1.12rem; /* Reduced from 1.4rem */
    font-weight: 700;
    color: #333;
    margin: 0.16rem 0; /* Reduced from 0.2rem */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.bento-grid-5 .bento-description {
    font-size: 0.64rem; /* Reduced from 0.8rem */
    color: #888;
    margin-top: 0.16rem; /* Reduced from 0.2rem */
    word-wrap: break-word;
    line-height: 1.3;
}

/* Mobile responsiveness for bento grid */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .bento-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .bento-grid-5 {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .bento-card {
        padding: 1rem;
        min-height: 120px;
        width: 100%;
    }
    
    .bento-grid-5 .bento-card {
        padding: 0.8rem;
        min-height: 96px;
        width: 100%;
    }
    
    .bento-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .bento-grid-5 .bento-icon {
        font-size: 1.6rem;
        margin-bottom: 0.48rem;
    }
    
    .bento-value {
        font-size: 1.2rem;
    }
    
    .bento-grid-5 .bento-value {
        font-size: 0.96rem;
    }
    
    .bento-title {
        font-size: 0.8rem;
    }
    
    .bento-grid-5 .bento-title {
        font-size: 0.64rem;
    }
    
    .bento-description {
        font-size: 0.7rem;
    }
    
    .bento-grid-5 .bento-description {
        font-size: 0.56rem;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .bento-grid-3 {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .bento-grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .bento-card {
        padding: 0.8rem;
        min-height: 100px;
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
    
    .bento-grid-5 .bento-card {
        padding: 0.64rem;
        min-height: 80px;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .bento-icon {
        font-size: 1.8rem;
        margin-bottom: 0;
        margin-right: 1rem;
        flex-shrink: 0;
    }
    
    .bento-grid-5 .bento-icon {
        font-size: 1.44rem;
        margin-bottom: 0.32rem;
        margin-right: 0;
    }
    
    .bento-content {
        align-items: flex-start;
        text-align: left;
    }
    
    .bento-grid-5 .bento-content {
        align-items: center;
        text-align: center;
    }
    
    .bento-value {
        font-size: 1.1rem;
    }
    
    .bento-grid-5 .bento-value {
        font-size: 0.88rem;
    }
} 