/* Campaign Analyzer Styles - Matching Site Design */

.center-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 12px;
}

/* Campaign Analyzer Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    --space-5xl: 5rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --text-primary-color: #ffffff;
    --text-secondary-color: rgba(255, 255, 255, 0.8);
    --background-color: #000000;
    --primary-color: #4ade80;
    --accent-color: #22c55e;

    /* Typography Scale */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Campaign Analyzer specific colors */
    --metric-positive: #22c55e;
    --metric-negative: #ef4444;
    --metric-neutral: #6b7280;
    --high-priority: #ef4444;
    --medium-priority: #f59e0b;
    --low-priority: #22c55e;
}

/* Background */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/desktop Bg image.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

/* Mobile background */
@media (max-width: 768px) {
    body {
        background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/mobile Bg image.webp');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    z-index: 100;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
    color: white;
    text-decoration: none;
}

/* Header */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

.page-header h1 {
    font-size: var(--font-4xl);
    font-weight: var(--font-extrabold);
    margin-bottom: 20px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.emoji-visible {
    font-size: 2.5rem;
    margin-right: 15px;
}

.page-header p {
    font-size: var(--font-lg);
    color: var(--text-secondary-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tool Section */
.tool-section {
    padding: 40px 0 80px;
}

.campaign-upload-layout,
.analysis-results-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Card */
.upload-card {
    padding: 30px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.tool-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.tool-name {
    font-size: var(--font-xl);
    font-weight: var(--font-semibold);
    margin-bottom: 5px;
    color: var(--text-primary-color);
}

.tool-description {
    font-size: var(--font-sm);
    color: var(--text-secondary-color);
    line-height: 1.5;
}

.upload-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Upload Options */
.upload-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-option {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-option:hover,
.upload-option.active {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.upload-option i {
    font-size: 24px;
    color: var(--text-secondary-color);
    transition: color 0.3s ease;
}

.upload-option:hover i,
.upload-option.active i {
    color: var(--primary-color);
}

.upload-option span {
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary-color);
    transition: color 0.3s ease;
}

.upload-option:hover span,
.upload-option.active span {
    color: var(--text-primary-color);
}

/* Manual Entry Form */
.manual-entry-form {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary-color);
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: var(--font-sm);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select {
    cursor: pointer;
}

/* CSV Upload */
.csv-upload-form {
    display: none;
}

.csv-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.csv-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(74, 222, 128, 0.05);
}

.upload-zone i {
    font-size: 48px;
    color: var(--text-secondary-color);
    margin-bottom: 15px;
    display: block;
}

.upload-zone p {
    color: var(--text-secondary-color);
    margin-bottom: 15px;
}

.upload-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.csv-template {
    margin-top: 15px;
    text-align: center;
}

.csv-template p {
    font-size: var(--font-sm);
    color: var(--text-secondary-color);
}

.csv-template a {
    color: var(--primary-color);
    text-decoration: none;
}

.csv-template a:hover {
    text-decoration: underline;
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Analysis Results */
.metrics-dashboard {
    padding: 30px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.metric-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: var(--font-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary-color);
    margin-bottom: 5px;
}

.metric-label {
    font-size: var(--font-sm);
    color: var(--text-secondary-color);
    margin-bottom: 8px;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--font-xs);
    color: var(--text-secondary-color);
}

.change-indicator {
    font-weight: var(--font-bold);
}

/* Charts Card */
.charts-card {
    padding: 30px;
}

.charts-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;
    color: var(--text-secondary-color);
}

.chart-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.chart-placeholder p {
    font-size: var(--font-lg);
}

/* Recommendations Card */
.recommendations-card {
    padding: 30px;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recommendation-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.rec-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.rec-content {
    flex: 1;
}

.rec-content h4 {
    font-size: var(--font-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary-color);
    margin-bottom: 8px;
}

.rec-content p {
    font-size: var(--font-sm);
    color: var(--text-secondary-color);
    line-height: 1.5;
    margin-bottom: 10px;
}

.rec-priority {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: var(--font-xs);
    font-weight: var(--font-medium);
}

.rec-priority.high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.rec-priority.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.rec-priority.low {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* Export Card */
.export-card {
    padding: 30px;
}

.export-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: black;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 30px;
    font-size: var(--font-lg);
    font-weight: var(--font-semibold);
    border-radius: 12px;
    min-width: 200px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-xs);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: rgba(0, 0, 0, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: var(--font-3xl);
    font-weight: var(--font-bold);
    margin-bottom: 15px;
    color: var(--text-primary-color);
}

.section-description {
    font-size: var(--font-lg);
    color: var(--text-secondary-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 222, 128, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: var(--font-xl);
    font-weight: var(--font-semibold);
    margin-bottom: 15px;
    color: var(--text-primary-color);
}

.feature-card p {
    font-size: var(--font-sm);
    color: var(--text-secondary-color);
    line-height: 1.6;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
}

.faq-header {
    text-align: center;
    margin-bottom: 60px;
}

.faq-header h2 {
    font-size: var(--font-3xl);
    font-weight: var(--font-bold);
    margin-bottom: 15px;
    color: var(--text-primary-color);
}

.faq-header p {
    font-size: var(--font-lg);
    color: var(--text-secondary-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question h3 {
    font-size: var(--font-lg);
    font-weight: var(--font-medium);
    color: var(--text-primary-color);
    margin: 0;
}

.faq-toggle {
    font-size: var(--font-xl);
    font-weight: var(--font-bold);
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 25px 25px;
    font-size: var(--font-sm);
    color: var(--text-secondary-color);
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-button {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .page-header {
        padding: 100px 0 40px;
    }

    .page-header h1 {
        font-size: var(--font-3xl);
    }

    .center-header {
        flex-direction: column;
        gap: 8px;
    }

    .emoji-visible {
        font-size: 2rem;
        margin-right: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .upload-options {
        flex-direction: column;
    }

    .upload-option {
        min-width: auto;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 15px;
    }

    .metric-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .export-options {
        flex-direction: column;
    }

    .upload-actions {
        flex-direction: column;
    }

    .card {
        border-radius: 12px;
    }

    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .tool-icon {
        align-self: center;
    }

    .analysis-results-layout {
        gap: 20px;
    }

    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .card {
        padding: 20px !important;
    }

    .page-header h1 {
        font-size: var(--font-2xl);
    }

    .breadcrumb {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Animation classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Message system */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.message.error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance Indicators */
.change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
}

.change-indicator.positive {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.change-indicator.negative {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

/* Metric Change Styles */
.metric-change {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* Recommendation Priority Styles */
.rec-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 8px;
}

.rec-priority.high {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.rec-priority.medium {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.rec-priority.low {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

/* Upload Zone Styles */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.upload-zone:hover {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.05);
}

.upload-link {
    color: #4ade80;
    text-decoration: underline;
    cursor: pointer;
}

.upload-link:hover {
    color: #22c55e;
}

/* CSV Template Link */
.csv-template {
    margin-top: 16px;
    text-align: center;
}

.csv-template a {
    color: #4ade80;
    text-decoration: none;
    font-size: 0.9rem;
}

.csv-template a:hover {
    text-decoration: underline;
}

/* Charts Styles */
.charts-container {
    padding: 20px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    max-height: 400px;
    overflow: hidden;
}

.chart-card h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.chart-card canvas {
    max-width: 100%;
    height: 300px !important;
    width: 100% !important;
}

/* Chart Placeholder */
.chart-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.chart-placeholder p {
    font-size: 1.1rem;
    margin: 0;
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-card h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
}