/* Recap Landing Page Styles */

.recap-landing-page {
    min-height: 100vh;
    background-color: var(--bg-secondary, #f8f9fa);
    color: var(--text-primary, #212529);
}

/* Hero Section */
.recap-hero {
    padding: 5rem 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

@media (prefers-color-scheme: light) {
    .recap-hero {
        background: #ffffff;
    }
}

[data-bs-theme="dark"] {
    .recap-hero {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
}

.recap-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/pattern-light.svg');
    opacity: 0.1;
    background-size: 30px 30px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

@media (prefers-color-scheme: light) {
    .hero-badge {
        background: #e3f2fd;
        color: #1565c0;
        border-color: #90caf9;
    }
}

[data-bs-theme="dark"] {
    .hero-badge {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* Light mode hero title */
@media (prefers-color-scheme: light) {
    .hero-title {
        color: var(--text-primary, #212529);
    }
}

.text-gradient {
    color: #1565c0;
    font-weight: 700;
}

[data-bs-theme="dark"] {
    .text-gradient {
        background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

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

/* Light mode hero subtitle */
@media (prefers-color-scheme: light) {
    .hero-subtitle {
        color: var(--text-secondary, #6c757d);
        opacity: 1;
    }
}

/* URL Input Section */
.url-input-section {
    margin-bottom: 2rem;
}

.url-input-section .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Light mode input group */
@media (prefers-color-scheme: light) {
    .url-input-section .input-group {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--border-color, #dee2e6);
    }
}

.url-input-section .input-group-text {
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    color: #1a237e;
}

.url-input-section .form-control {
    border: 1px solid var(--border-color, #dee2e6);
    padding: 1rem;
    font-size: 1.1rem;
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #212529);
}

.url-input-section .btn-theme-primary {
    padding: 1rem 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    transition: all 0.3s ease;
}

.url-input-section .btn-theme-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.url-input-section .form-text {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    z-index: 1;
}

.recap-preview-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: var(--bs-body-color);
    max-width: 500px;
    margin: 0 auto;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-meta h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.preview-meta p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

.preview-content {
    position: relative;
}

.preview-text {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.preview-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: linear-gradient(to bottom, transparent, var(--bg-primary, #ffffff));
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: var(--bs-gray-100);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--bs-secondary);
    margin-bottom: 3rem;
}

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

.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list i {
    color: #10b981;
}

/* How It Works Section */
.how-it-works-section {
    padding: 5rem 0;
    background: var(--bs-gray-100);
}

.process-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.process-step {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.process-connector {
    width: 50px;
    height: 2px;
    background: var(--border-color, #dee2e6);
    position: relative;
}

.process-connector::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -4px;
    width: 0;
    height: 0;
    border-left: 10px solid var(--border-color, #dee2e6);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Recent Recaps Section */
.recent-recaps-section {
    padding: 5rem 0;
}

.recaps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.recap-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.recap-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

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

.recap-header h4 {
    font-size: 1.125rem;
    margin: 0;
    flex: 1;
}

.recap-date {
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

.recap-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

.recap-meta i {
    margin-right: 0.25rem;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

/* Light mode CTA subtitle */
@media (prefers-color-scheme: light) {
    .cta-subtitle {
        color: var(--text-secondary, #6c757d);
        opacity: 1;
    }
}

/* Flippy Commentary Section */
.flippy-commentary-section {
    padding: 5rem 0;
    background: var(--bs-gray-100);
}

.flippy-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 2rem;
    align-items: start;
    max-width: 800px;
    margin: 0 auto;
}

.flippy-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.flippy-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flippy-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.flippy-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.flippy-content p:last-child {
    margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .process-connector {
        display: none;
    }

    .flippy-card {
        flex-direction: column;
        text-align: center;
    }

    .flippy-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .url-input-section .input-group {
        flex-direction: column;
    }

    .url-input-section .input-group-text {
        width: 100%;
        border-radius: 0.5rem 0.5rem 0 0 !important;
        border-bottom: 0;
    }

    .url-input-section .form-control {
        width: 100%;
        border-radius: 0 !important;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .url-input-section .btn-theme-primary {
        width: 100%;
        border-radius: 0 0 0.5rem 0.5rem !important;
        margin-top: -1px;
    }

    /* Ensure text inputs don't get cut off */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none; /* Remove iOS styling */
    }
}

/* Dark Theme Support */
[data-bs-theme="dark"] {
    .recap-preview-card {
        background: var(--theme-surface-2);
        color: var(--theme-text-primary);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    .preview-meta p {
        color: var(--theme-text-muted);
    }

    .preview-fade {
        background: linear-gradient(to bottom, transparent, var(--theme-surface-2));
    }

    /* Features Section */

    .features-section {
        background: var(--theme-bg-secondary);
    }

    .feature-card {
        background: var(--theme-surface-1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .feature-card:hover {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    /* Narrator Section */

    .narrator-card {
        background: var(--theme-surface-1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .narrator-card:hover:not(.coming-soon) {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .narrator-avatar {
        background: var(--theme-surface-3);
    }

    .narrator-avatar i {
        color: var(--theme-text-muted);
    }

    .narrator-description {
        color: var(--theme-text-secondary);
    }

    .narrator-sample {
        background: var(--theme-surface-2);
    }

    .narrator-sample i {
        color: var(--theme-text-muted);
    }

    /* How It Works */

    .how-it-works-section {
        background: var(--theme-bg-secondary);
    }

    .process-connector {
        background: var(--theme-border-color);
    }

    .process-connector::after {
        border-left-color: var(--theme-border-color);
    }

    /* Recent Recaps */

    .recap-card {
        background: var(--theme-surface-1);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .recap-card:hover {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }

    .recap-date,
    .recap-meta {
        color: var(--theme-text-muted);
    }

    /* Flippy Commentary */

    .flippy-commentary-section {
        background: var(--theme-bg-secondary);
    }

    .flippy-card {
        background: var(--theme-surface-1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    /* URL Input */

    .url-input-section .input-group-text {
        background: var(--theme-surface-2);
        color: var(--theme-text-primary);
    }

    .url-input-section .form-control {
        background: var(--theme-surface-1);
        color: var(--theme-text-primary);
    }

    .url-input-section .form-control:focus {
        background: var(--theme-surface-1);
        color: var(--theme-text-primary);
        border-color: #3949ab;
    }
}

/* Generation Page Styles */
.recap-generation-page {
    min-height: 100vh;
    padding: 5rem 0;
    background-color: var(--theme-bg-primary);
}

.generation-container {
    max-width: 800px;
    margin: 0 auto;
}

.generation-header {
    text-align: center;
    margin-bottom: 3rem;
}

.generation-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--theme-text-primary);
}

.generation-progress {
    background: var(--theme-surface-1);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--theme-shadow-lg);
}

.progress-wrapper {
    margin-bottom: 2rem;
}

.progress {
    height: 2rem;
    background-color: var(--theme-surface-3);
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--theme-text-secondary);
}

/* Flippy Loading Messages */
.flippy-loading-messages {
    margin: 2rem 0;
}

.flippy-message-card {
    display: flex;
    gap: 1rem;
    align-items: start;
    background: var(--theme-surface-2);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.flippy-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.flippy-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flippy-message {
    flex: 1;
}

.flippy-message p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.flippy-message p:last-child {
    margin-bottom: 0;
}

.estimated-time {
    text-align: center;
    color: var(--theme-text-muted);
    margin: 1.5rem 0;
}

.generation-actions {
    text-align: center;
    margin-top: 2rem;
}

.generation-error {
    margin-top: 2rem;
}

.error-actions {
    margin-top: 1rem;
}

/* Dark theme for generation page */
[data-bs-theme="dark"] {
    .generation-progress {
        background: var(--theme-surface-2);
    }

    .progress {
        background-color: var(--theme-surface-3);
    }

    .flippy-message-card {
        background: var(--theme-surface-3);
    }
}

/* Tournament Details Step Styles */
.generation-step {
    transition: all 0.3s ease;
}

.tournament-details-card {
    background: var(--theme-surface-1);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.tournament-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--theme-border-color);
}

.tournament-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-text-primary);
}

.tournament-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--theme-surface-2);
    border-radius: 0.5rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: var(--theme-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.info-label i {
    color: var(--theme-primary, #1a237e);
    width: 20px;
    text-align: center;
}

.selection-group {
    margin-bottom: 1.5rem;
}

.selection-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--theme-text-primary);
}

.selection-group label i {
    color: var(--theme-primary, #1a237e);
}

.form-select {
    border: 2px solid var(--theme-border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--theme-surface-1);
    color: var(--theme-text-primary);
}

.form-select:focus {
    border-color: var(--theme-primary, #1a237e);
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
}

.form-select.is-invalid {
    border-color: #dc3545;
}

.form-select.form-select-lg {
    font-size: 1.125rem;
    padding: 1rem 1.25rem;
}

/* Generation Options */
.generation-options {
    margin-top: 2rem;
}

.or-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.or-divider span {
    background: var(--theme-surface-1, white);
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    color: var(--theme-text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--theme-border-color);
}

.single-round-section {
    background: var(--theme-surface-2);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--theme-border-color);
}

.single-round-section .selection-group {
    margin-bottom: 1rem;
}

/* Dark theme for tournament details */
[data-bs-theme="dark"] {
    .tournament-details-card {
        background: var(--theme-surface-2);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .tournament-info {
        background: var(--theme-surface-3);
    }

    .form-select {
        background-color: var(--theme-surface-2);
        border-color: var(--theme-border-color);
    }

    .form-select:focus {
        background-color: var(--theme-surface-2);
        border-color: var(--theme-info, #3b82f6);
        box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    }
}
