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

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f7f7f7;
    --gray-200: #e6e6e6;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --accent: #0066ff;
    --accent-hover: #0052cc;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --max-width: 1200px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--gray-200);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.375rem;
    color: var(--black);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--black);
}

.nav-links a.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-cta {
    background: var(--accent);
    color: var(--white) !important;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--accent-hover);
    color: var(--white) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 0.25rem;
    display: none;
}

/* Add a pseudo-element to bridge the gap between dropdown toggle and content */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.25rem;
    z-index: 1000;
}

.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 6px;
    margin: 0.25rem;
}

.dropdown-content a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.75rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Mobile hamburger menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--black);
    transition: all 0.3s linear;
    border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    padding: 10rem 2rem 6rem;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--accent), #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.btn-secondary {
    background: var(--white);
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

.btn-danger {
    background: #dc3545;
    color: var(--white);
    border: 2px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-white {
    background: var(--white);
    color: var(--black);
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Special nav button styles */
.nav-links .btn-primary {
    color: var(--white) !important;
}

.nav-links .btn-primary:hover {
    color: var(--white) !important;
}

/* Stats Section */
.stats {
    padding: 4rem 2rem;
    background: var(--gray-100);
}

/* Trusted By Section */
.trusted-by {
    padding: 4rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.trusted-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.trusted-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2rem;
}

.trust-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin-bottom: 2rem;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.star {
    color: var(--gray-300);
}

.star.filled {
    color: #FFC107;
}

.star.partial {
    position: relative;
    color: #FFC107;
}

.star.partial::after {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    width: 80%;
    overflow: hidden;
    color: var(--gray-300);
}

.rating-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--black);
}

.rating-text {
    color: var(--gray-600);
    font-size: 1rem;
}

.review-count {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.count-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
}

.count-text {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.trust-badges img {
    height: 40px;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: opacity 0.2s ease;
}

.trust-badges img:hover {
    opacity: 1;
}

.stats-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Work Section */
.work {
    padding: 6rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.work-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #00c6ff);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.work-card:hover {
    border-color: var(--gray-300);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.work-card:hover::before {
    transform: translateY(0);
}

.work-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.work-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

.work-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Optimize Section */
.optimize-section {
    padding: 6rem 2rem;
    background: var(--gray-100);
    min-height: 100vh;
}

.optimize-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* API Key Section */
.api-key-section {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.api-key-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.api-key-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

.api-key-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.api-key-input-group {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.api-key-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-mono);
    transition: border-color 0.2s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--accent);
}

.api-key-help {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.api-key-help a {
    color: var(--accent);
    text-decoration: none;
}

.api-key-help a:hover {
    text-decoration: underline;
}

/* Main App */
.main-app {
    animation: fadeIn 0.3s ease;
}

/* Tier Selection */
.tier-selection {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.tier-selection h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    text-align: center;
    margin-bottom: 2rem;
}

.tier-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tier-subtitle {
    text-align: center;
    color: var(--gray-600);
    font-size: 1.125rem;
    margin-top: -1rem;
    margin-bottom: 2.5rem;
}

.tier-option {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.tier-option:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tier-option.active {
    background: var(--white);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.tier-option.active::before {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.tier-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tier-option h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.tier-option p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tier-badge-recommended {
    background: var(--success);
}

.tier-badge-premium {
    background: var(--gray-900);
}

.tier-tagline {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.tier-features {
    list-style: none;
    text-align: left;
    margin: 0 0 auto 0;
    flex-grow: 1;
}

.tier-features li {
    padding: 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tier-ideal {
    display: block;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: auto;
    font-weight: 500;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.input-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

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

.char-count {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.char-count.warning {
    color: var(--warning);
}

.char-count.error {
    color: var(--error);
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

textarea {
    width: 100%;
    height: 400px;
    padding: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.file-upload-area:hover {
    border-color: var(--accent);
    background: rgba(0, 102, 255, 0.05);
}

.file-upload-area.dragging {
    border-color: var(--accent);
    background: rgba(0, 102, 255, 0.1);
}

.file-upload-area svg {
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.file-upload-area p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.file-upload-link {
    color: var(--accent);
    cursor: pointer;
}

.file-upload-link:hover {
    text-decoration: underline;
}

.file-types {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.file-preview {
    margin-top: 1rem;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.file-name {
    font-weight: 500;
    color: var(--gray-700);
}

.remove-file {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.remove-file:hover {
    text-decoration: underline;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.action-buttons .btn {
    margin: 0;
}

.cost-estimate {
    font-size: 0.875rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-left: auto;
    font-weight: 500;
}

/* Results Section */
.results {
    animation: fadeIn 0.5s ease;
}

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

.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
}


/* Before Match Analysis Section */
.before-match-section {
    margin: 2rem 0;
    animation: fadeIn 0.5s ease;
}

.before-match-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.before-match-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.before-match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.before-match-score .score-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--black);
}

.before-match-score .score-value.good {
    color: var(--success);
}

.before-match-score .score-value.moderate {
    color: #f59e0b;
}

.before-match-score .score-value.poor {
    color: #ef4444;
}

.before-match-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

/* Match Scores Container in Results */
.match-scores-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.match-score-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 100px;
    transition: all 0.2s ease;
}

.match-score-badge.before-score {
    border-color: #f59e0b;
}

.match-score-badge.after-score {
    border-color: var(--success);
}

.match-score-badge .score-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
}

.match-score-badge.before-score .score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f59e0b;
}

.match-score-badge.after-score .score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

.match-score-improvement {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}


/* Results Tabs */
.results-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 2rem;
}

.result-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.result-tab.active {
    color: var(--black);
}

.result-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* Result Panels */
.result-panel {
    display: none;
    margin-bottom: 2rem;
}

.result-panel.active {
    display: block;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--black);
    color: var(--black);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.resume-display {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 600px;
    overflow-y: auto;
}

/* Comparison View */
.comparison-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.comparison-column {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.comparison-column h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-column:first-child h3::before {
    content: "📄";
    font-size: 1.25rem;
}

.comparison-column:last-child h3::before {
    content: "✨";
    font-size: 1.25rem;
}

.comparison-content {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
    font-size: 0.9375rem;
    line-height: 1.8;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* Formatted Resume Styles */
.formatted-resume {
    font-family: var(--font-sans);
    color: var(--gray-800);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Original Resume Styles - handles over-processed text from cleanText() */
.original-resume-section {
    font-family: var(--font-sans);
    color: var(--gray-800);
    white-space: pre-line;
    word-wrap: break-word;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* H2 rule removed - no longer using h2 in original section */

.original-resume-section p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.original-resume-section ul, .original-resume-section ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.original-resume-section li {
    margin-bottom: 0.25rem;
}

.comparison-content .formatted-resume {
    line-height: 1.7;
    font-size: 0.9rem;
}

.resume-section-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--black);
    margin: 1.5rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

.formatted-resume h4:first-child {
    margin-top: 0;
}

.resume-list {
    list-style: none;
    margin: 0.5rem 0;
    padding-left: 0;
}

.resume-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.resume-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--gray-500);
    font-weight: bold;
}

.resume-link {
    color: var(--accent);
    text-decoration: none;
}

.resume-link:hover {
    text-decoration: underline;
}

.resume-phone {
    color: var(--gray-600);
}

.resume-date {
    color: var(--gray-500);
    font-style: italic;
    font-size: 0.875rem;
}

.added {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--gray-900);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    border-bottom: 2px solid var(--success);
}

.removed {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    text-decoration: line-through;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Scroll sync indicator */
.comparison-content::-webkit-scrollbar {
    width: 8px;
}

.comparison-content::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.comparison-content::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.comparison-content::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

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

.insight-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
}

.insight-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--black);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    background: var(--gray-100);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.skills-list,
.tips-list,
.recommendations-list {
    list-style: none;
}

.skills-list li,
.tips-list li,
.recommendations-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: start;
    gap: 0.75rem;
    color: var(--gray-700);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.skills-list li:last-child,
.tips-list li:last-child,
.recommendations-list li:last-child {
    border-bottom: none;
}

.skills-list li::before {
    content: "⚠️";
    flex-shrink: 0;
}

.tips-list li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
    flex-shrink: 0;
}

.recommendations-list li::before {
    content: "💡";
    flex-shrink: 0;
}

/* Expertise Section */
.expertise {
    padding: 6rem 2rem;
    background: var(--gray-100);
}

.expertise-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.expertise-category {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.expertise-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

.expertise-category p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 6rem 2rem;
    background: var(--gray-100);
}

.testimonials-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

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

.testimonial-header .stars {
    font-size: 1.125rem;
}

.review-date {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.testimonial-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.75rem;
}

.testimonial-text {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.reviewer-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-600);
    position: relative;
    overflow: hidden;
}

/* Fallback initials when image fails to load */
.reviewer-avatar::before {
    content: attr(data-initials);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    text-transform: uppercase;
}

.reviewer-name {
    font-weight: 600;
    color: var(--black);
}

.reviewer-info {
    color: var(--gray-600);
}

.verified-badge {
    margin-left: auto;
    color: var(--success);
    font-weight: 600;
}

.star.empty {
    color: var(--gray-300);
}

.testimonials-cta {
    text-align: center;
    margin-top: 3rem;
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--accent), #0052cc);
    color: var(--white);
}

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

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--gray-400);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    padding: 4rem 2rem 2rem;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--black);
}

.footer-brand p {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--black);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--black);
}

.modal-content p {
    color: var(--gray-600);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Auth Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.auth-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--black);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--black);
    font-size: 0.875rem;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.field-hint {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.form-actions {
    margin-top: 0.5rem;
}

.btn-full {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.auth-benefits {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.auth-benefits p {
    margin: 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.auth-links a {
    color: var(--accent);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links span {
    color: var(--gray-400);
    margin: 0 0.5rem;
}

.auth-message {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-message.success {
    background: var(--success);
    color: var(--white);
    border-color: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.auth-message.error {
    background: var(--error);
    color: var(--white);  
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Auth UI Elements */
.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.usage-display {
    background: var(--gray-100);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usage-text {
    color: var(--gray-700);
    font-weight: 500;
}

.usage-warning {
    color: var(--warning);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 0;
        padding: 0.5rem 1.5rem;
        border-bottom: 1px solid var(--gray-100);
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        color: var(--black);
        text-decoration: none;
        font-weight: 500;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        padding: 1rem 1.5rem;
    }
    
    .auth-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.5rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0.25rem 0;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        padding: 1rem 1.5rem;
    }
    
    .user-info .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.5rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        font-size: 0.95rem;
        font-weight: 600;
    }
    
    .user-info .user-email {
        font-size: 0.9rem;
        color: var(--gray-600);
        text-align: center;
    }
    
    .nav-cta {
        background: var(--primary);
        color: var(--white) !important;
        border-radius: 6px;
        margin: 0.5rem 0 0 0;
    }

    /* Mobile dropdown styles */
    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 0;
        background: var(--gray-50);
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown.active .dropdown-content {
        display: block;
        opacity: 1;
        visibility: visible;
        max-height: 200px;
    }

    .dropdown-content a {
        padding: 0.5rem 1rem 0.5rem 2rem;
        margin: 0;
        border-radius: 0;
        font-size: 0.85rem;
    }

    .dropdown-toggle::after {
        display: none;
    }

    .hero {
        padding: 8rem 1.5rem 4rem;
    }

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

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .input-grid,
    .comparison-grid,
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-content {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .tier-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tier-option {
        padding: 1.5rem 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .trust-badges {
        flex-wrap: wrap;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* Checkbox Styles for Terms of Service */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-top: 0.2rem;
    cursor: pointer;
}

.checkbox-text {
    line-height: 1.4;
}

.checkbox-text a {
    color: var(--accent);
    text-decoration: underline;
}

.checkbox-text a:hover {
    color: var(--accent-dark);
}

/* Pick Plan Page Styles */
.current-balance {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.balance-card {
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.1);
    max-width: 300px;
}

.balance-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.pricing-note {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.pricing-note p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .balance-card {
        margin: 0 1rem;
        padding: 1rem 1.5rem;
    }
    
    .balance-amount {
        font-size: 1.25rem;
    }
}

/* Markdown Content Styles for Professional Resume Display */
.markdown-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark, #2c3e50);
}

.markdown-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary, #0066ff);
    margin: 1.5rem 0 1rem 0;
    border-bottom: 2px solid var(--primary, #0066ff);
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
    margin: 1.25rem 0 0.75rem 0;
    border-bottom: 1px solid var(--gray-300, #ddd);
    padding-bottom: 0.25rem;
}

.markdown-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
    margin: 1rem 0 0.5rem 0;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
    margin: 0.75rem 0 0.5rem 0;
}

.markdown-content p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.markdown-content strong {
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
}

.markdown-content em {
    font-style: italic;
    color: var(--gray-700, #555);
}

.markdown-content code {
    background: var(--gray-100, #f8f9fa);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary, #0066ff);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: var(--gray-50, #f9f9f9);
    font-style: italic;
}

/* Ensure proper spacing between sections */
.markdown-content > *:first-child {
    margin-top: 0;
}

.markdown-content > *:last-child {
    margin-bottom: 0;
}