/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Geneva" !important;
}

body {
    line-height: 1.6;
    color: #334155;
    background-color: #f8fafc;
}

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

/* Page management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Header styles */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
}

.logo i {
    width: 32px;
    height: 32px;
}

.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
}

.benefit i {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #3b82f6;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 2rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

.trust-item i {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* Hero visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.dashboard-preview {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 100%;
}

.preview-card {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #64748b;
    font-weight: 400;
}

.card-header i {
    width: 20px;
    height: 20px;
}

.score-display {
    font-size: 3rem;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.score-label {
    color: #64748b;
    font-weight: 400;
}

.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

/* Features section */
.features-section {
    padding: 4rem 0;
    background: white;
}

/* Footer styles */
.footer {
    background: #1e293b;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.footer-text {
    color: #64748b;
    font-size: 0.875rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin-bottom: 1rem;
    color:white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #334155;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Dashboard styles */
.dashboard-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 400;
    color: #334155;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background: #e2e8f0;
    color: #64748b;
}

.dashboard-content {
    padding: 2rem 0;
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Statistics row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: #f1f5f9;
}

.stat-icon i {
    width: 24px;
    height: 24px;
    color: #64748b;
    display: block;
    margin: 0 auto;
}

.score-card .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.score-card .stat-icon i {
    color: white;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: #334155;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 400;
}

/* Content row */
.content-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.main-card, .side-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 2rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
}

.card-header p {
    color: #64748b;
    margin-bottom: 2rem;
}

.import-subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Import options */
.import-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
    color: #334155;
}

.checkbox-content i {
    width: 20px;
    height: 20px;
    color: #64748b;
}

/* Buttons */
.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.primary-button i {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-button:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* API Usage */
.api-usage {
    display: flex;
    flex-direction: column;
}

.usage-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.usage-details > div {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.usage-details > div:last-child {
    border-bottom: none;
}

.usage-item {
    margin-bottom: 0.75rem;
}

.usage-item:last-child {
    margin-bottom: 0;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.usage-bar {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
    background-color: #10b981; /* Default green */
}

.usage-fill.medium {
    background-color: #f59e0b; /* Orange for 50-80% */
}

.usage-fill.high {
    background-color: #ef4444; /* Red for 80%+ */
}

.usage-text {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 400;
}

/* Results section */
.results-section {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 2rem;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

.results-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Common dropdown styles */
.dropdown-select,
.results-filters select,
.analytics-controls select {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.dropdown-select:hover,
.results-filters select:hover,
.analytics-controls select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.dropdown-select:focus,
.results-filters select:focus,
.analytics-controls select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown-select option,
.results-filters select option,
.analytics-controls select option {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
}

.flagged-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Mobile responsiveness for flagged content */
@media (max-width: 480px) {
    .flagged-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
    }

    .result-card {
        max-width: 100%;
        width: 100%;
    }
}

.result-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    height: fit-content;
}

.result-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-card.high {
    border-left: 4px solid #ef4444;
}

.result-card.medium {
    border-left: 4px solid #f59e0b;
}

.result-card.low {
    border-left: 4px solid #10b981;
}

.result-card.non-analyzed {
    border-left: 4px solid #6b7280;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.result-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    color: #334155;
    text-transform: capitalize;
}

.result-type i {
    width: 18px;
    height: 18px;
    color: #64748b;
}

.risk-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.risk-badge.high {
    background: #fee2e2;
    color: #dc2626;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

.risk-badge.low {
    background: #dcfce7;
    color: #16a34a;
}

.risk-badge.non-analyzed {
    background: #f3f4f6;
    color: #334155;
}

.result-content {
    margin-bottom: 1rem;
}

.result-content p {
    color: #334155;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.result-media {
    border-radius: 0.5rem;
    overflow: hidden;
    max-width: 100%;
    margin: 0.75rem 0;
}

.result-media img,
.result-media video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.result-details {
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

.risk-score {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.risk-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-tag {
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #334155;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 400;
}

.explanation {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.fb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.2s;
}

.fb-link:hover {
    color: #1d4ed8;
}

.fb-link i {
    width: 14px;
    height: 14px;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.no-results i {
    width: 48px;
    height: 48px;
    color: #10b981;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* Actions section */
.actions-section {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

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

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
}

.close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f9fafb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: #f3f4f6;
}

.close-btn i {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.modal-body {
    padding: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-text {
    color: #334155;
    font-weight: 400;
}

.progress-percentage {
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-fill.completed {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-fill.error {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.email-notification {
    margin: 1.5rem 0 1rem 0;
}

.email-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #64748b;
}

.email-checkbox-item input[type="checkbox"] {
    display: none;
}

.email-checkbox-item .checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s;
}

.email-checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.email-checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.email-checkbox-item:hover .checkmark {
    border-color: #3b82f6;
}

.progress-actions {
    display: flex;
    justify-content: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .content-row {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .results-filters {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .dropdown-select,
    .results-filters select,
    .analytics-controls select {
        width: 100%;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .benefits {
        align-items: center;
    }

    .trust-indicators {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .checkbox-item {
        padding: 0.75rem;
    }

    .main-card,
    .side-card {
        padding: 1.5rem;
    }

    .button-group {
        justify-content: center;
    }
}

/* Paywall modal styles */
#paywall-modal .modal-content {
    max-width: 600px;
}

.credit-summary {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.credit-summary p {
    margin-bottom: 0.5rem;
}

.credit-summary p:last-child {
    margin-bottom: 0;
}

.pricing-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
}

.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.package-option {
    cursor: pointer;
}

.package-option input[type="radio"] {
    display: none;
}

.package-card {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    background: white;
}

.package-option input[type="radio"]:checked + .package-card {
    border-color: #3b82f6;
    background: #eff6ff;
}

.package-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.package-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.package-label {
    font-size: 0.875rem;
    color: #64748b;
}

.discount-section {
    margin-bottom: 2rem;
}

.discount-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.discount-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.discount-input button {
    padding: 0.75rem 1rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.discount-input button:hover {
    background: #4b5563;
}

.discount-status {
    font-size: 0.875rem;
}

.discount-status .success {
    color: #059669;
}

.discount-status .error {
    color: #dc2626;
}

.payment-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.summary-line:last-child {
    margin-bottom: 0;
}

.total-line {
    border-top: 1px solid #d1d5db;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.payment-element {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
}

/* Apple Pay button styling */
.payment-element .StripeElement {
    margin-bottom: 1rem;
}

.payment-element [data-testid="apple-pay-button"] {
    margin-bottom: 1rem;
}

.paywall-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.paywall-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

/* Free credits message */
.free-credits-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    margin: 1rem 0;
}

.free-credits-message h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.free-credits-message p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.free-credits-message strong {
    color: #d1fae5;
}

@media (max-width: 640px) {
    .credit-packages {
        grid-template-columns: 1fr 1fr;
    }

    .discount-input {
        flex-direction: column;
    }

    .paywall-actions {
        flex-direction: column;
    }

    .free-credits-message {
        padding: 1.5rem;
    }

    .free-credits-message h4 {
        font-size: 1.25rem;
    }

    .free-credits-message p {
        font-size: 1rem;
    }
}

/* Analytics Panel Styles */
.analytics-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.analytics-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.analytics-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}


.analytics-content {
    padding: 1.5rem;
}

.chart-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    height: 400px;
    position: relative;
}

.chart-container canvas {
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.875rem;
}

.stat-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-header h2 {
        justify-content: center;
    }

    .chart-container {
        height: 300px;
        padding: 0.5rem;
    }

    .analytics-stats {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 0.5rem;
    }
}
