:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-purple: #7c3aed;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --accent-success: #10b981;
    --accent-error: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header - Sleek Linear Style */
header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mozilla-logo {
    height: 48px;
    width: auto;
    opacity: 0.95;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Video Grid - Sleek cards */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin: 32px 0;
    padding-bottom: 0;
}

/* Video Card - Linear-inspired */
.video-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.video-card:focus {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.card-header {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 20px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.card-speakers {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

.card-body {
    padding: 16px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    letter-spacing: 0.01em;
}

.card-duration {
    color: var(--text-tertiary);
    font-size: 0.813rem;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-weight: 500;
}

.card-duration::before {
    content: "⏱";
    font-size: 0.875rem;
}

/* Modal - Sleek Linear Design */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    overflow: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 300;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.modal-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    height: 80vh;
    max-height: 800px;
    overflow: hidden;
}

/* Video Container */
.video-container {
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.play-button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.play-button:hover {
    transform: scale(1.08);
    color: var(--accent-purple);
}

/* Feedback Panel - Linear Style */
.feedback-panel {
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-tertiary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.feedback-panel h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.feedback-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Thumbs Up/Down - Linear Style */
.thumbs-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.thumb-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.thumb-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.thumb-btn.selected.thumb-up {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-success);
    color: var(--accent-success);
}

.thumb-btn.selected.thumb-down {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-error);
    color: var(--accent-error);
}

.thumb-btn svg {
    width: 32px;
    height: 32px;
}

.thumb-btn.selected svg {
    stroke: currentColor;
}

/* Textarea - Linear Style */
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    transition: all 0.2s;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

textarea::placeholder {
    color: var(--text-tertiary);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 6px;
    font-weight: 500;
}

/* Checkbox - Linear Style */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent-purple);
}

.email-field {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.email-field:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.email-field::placeholder {
    color: var(--text-tertiary);
}

/* Buttons - Linear Style */
.submit-btn,
.secondary-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.submit-btn {
    background: var(--accent-purple);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover:not(:disabled) {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    margin-top: 12px;
}

.secondary-btn:hover {
    background: var(--bg-primary);
    border-color: var(--border-hover);
}

/* Thank You - Linear Style */
.thank-you {
    text-align: center;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.thank-you-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: celebrate 0.6s ease-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.thank-you h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.thank-you p {
    color: var(--text-secondary);
    font-size: 0.938rem;
    max-width: 320px;
    line-height: 1.6;
}

/* Footer - Linear Style */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    text-align: center;
    padding: 32px 0;
    margin-top: 32px;
    font-size: 0.875rem;
}

footer strong {
    color: var(--text-primary);
}

footer a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent-blue);
}

/* Responsive */
@media (max-width: 968px) {
    .modal-body {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .video-container {
        min-height: 300px;
        border-radius: 12px 12px 0 0;
    }

    .feedback-panel {
        max-height: 60vh;
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .header-text h1 {
        font-size: 1.25rem;
    }

    .mozilla-logo {
        height: 28px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 24px 0;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 0;
    }

    .thumbs-buttons {
        gap: 8px;
    }

    .thumb-btn {
        padding: 14px 8px;
    }

    .thumb-btn svg {
        width: 28px;
        height: 28px;
    }

    .feedback-panel {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.125rem;
    }

    .subtitle {
        font-size: 0.813rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .feedback-panel {
        padding: 20px;
    }
}