:root {
    --primary: #277FF2;
    --primary-color: #277FF2;
    --primary-focus-ring: rgba(39, 127, 242, 0.5);
    --charcoal: #1A1A1A;
    --off-white: #F5F7FA;
    --success: #34C759;
    --error: #FF6B6B;
    --warning: #FDBA21;
    --gray-blue: #8A8FA3;
    --light-gray: #E2E6ED;
    --white: #fff;
}
/* LP theme utilities moved from index.html */

body {
    line-height: 1.6;
    color: var(--charcoal);
}

.section-padding {
    padding-top: clamp(4rem, 6vw, 7rem);
    padding-bottom: clamp(4rem, 6vw, 7rem);
}

.section-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 5vw, 4rem);
}
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-secondary {
    background-color: var(--off-white);
    color: var(--charcoal);
}
.btn-secondary:hover {
    background-color: #e5e7eb; /* gray-200 */
}
.section-title {
    text-align: center;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 2.5rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    position: relative;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary));
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.section-title.gradient-text {
    background: linear-gradient(135deg, var(--primary), #4F46E5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-subtitle {
    margin-top: 1.5rem;
    color: var(--gray-blue);
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    text-align: center;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Hero Section Enhancements */
.hero-badge {
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(39, 127, 242, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(39, 127, 242, 0.5);
    }
}

.hero-highlight {
    position: relative;
    display: inline-block;
}

.hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
    animation: highlight-expand 2s ease-out;
}

@keyframes highlight-expand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Enhanced feature cards */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 230, 237, 0.5);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #4F46E5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.feature-description {
    color: var(--gray-blue);
    line-height: 1.6;
    font-size: 1rem;
}

/* Trust signal cards */
.trust-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.trust-card:hover {
    transform: translateY(-2px);
}

/* Enhanced CTA buttons */
.cta-enhanced {
    position: relative;
    overflow: hidden;
}

.cta-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cta-enhanced:hover::before {
    left: 100%;
}
/* CSS rules will be extracted here */
#myModal .bg-white {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modal-appear 0.3s ease-out;
    box-sizing: border-box;
}
@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.spinner-animation {
    animation: spin 1s linear infinite, pulse 1.5s ease-in-out infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
#closeModalBtn {
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
#closeModalBtn:hover {
    transform: rotate(90deg);
    background-color: var(--light-gray);
}
.submit-btn {
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.submit-btn:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.error-animation {
    animation: slide-down-fade-in 0.3s ease-out;
}
@keyframes slide-down-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.divider-text {
    text-shadow: 0 1px 0 #fff;
}
#main-content {
    background-image: linear-gradient(to bottom right, #F5F7FA, #E2E6ED);
}

/* Safe area helpers for iOS notches (mobile) */
.safe-area-top {
    padding-top: env(safe-area-inset-top);
}
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}
.footer-heading {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.footer-link {
    color: rgba(226, 230, 237, 0.85);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: color 0.2s ease-in-out;
}

.footer-link:hover {
    color: var(--white);
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 100%);
    margin: 2.5rem 0 1.5rem;
}
input[type="email"], input[type="password"] {
    border-color: var(--light-gray);
    transition: box-shadow 0.2s ease-in-out;
}
input[type="email"]:focus, input[type="password"]:focus {
    box-shadow: 0 0 0 3px var(--primary-focus-ring), 0 0 15px var(--primary-focus-ring);
    outline: none;
}
#modal-content {
    display: flex;
    width: 200%;
    transition: transform 0.3s ease-in-out;
    height: 100%;
}
#step-email, #step-password {
    width: 50%;
    padding: 2rem;
    box-sizing: border-box;
    height: 100%;
}
.slide-to-password {
    transform: translateX(-50%);
}

/* Mobile slide transition: keep horizontal slide */
@media (max-width: 768px) {
    .slide-to-password {
        transform: translateX(-50%);
    }
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    #modal-content {
        width: 200%;
        flex-direction: row;
        box-sizing: border-box;
        height: 100%;
    }

    /* Ensure modal never exceeds screen bounds */
    #myModal {
        max-width: 100vw;
        max-height: 100vh;
    }
    #step-email, #step-password {
        width: 50%;
        padding: 1rem 0.75rem;
        box-sizing: border-box;
        min-height: 100%;
    }

    /* Additional mobile optimizations */
    #myModal {
        padding: 0.5rem;
    }

    #myModal .bg-white {
        border-radius: 1rem;
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        box-sizing: border-box;
        min-height: 400px;
        max-height: 85vh;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #myModal {
        padding: 0.25rem;
    }

    #myModal .bg-white {
        max-width: 100vw;
        width: 100%;
        margin: 0;
        border-radius: 0.5rem;
        min-height: 350px;
        max-height: 90vh;
    }

    #step-email, #step-password {
        padding: 0.75rem 0.5rem;
    }
}
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#back-btn:hover {
    background-color: var(--off-white);
    border-radius: 9999px;
}
.social-btn {
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.sidebar-label {
    transition: opacity 0.2s ease-in-out;
}

#sidebar.collapsed .sidebar-label {
    opacity: 0;
}

.candidate-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.candidate-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hide scrollbars on mobile for horizontal chip lists */
.no-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.job-title-container {
    height: 80px; /* Adjust this value as needed */
    display: flex;
    flex-direction: column;
}

.job-title-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile adjustments for jobs list cards to prevent overlap */
@media (max-width: 768px) {
    .job-title-container { height: auto; }
    /* Ensure links don't overflow card horizontally */
    #jobs-history-container a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
}
a.sidebar-active-link {
    color: var(--primary) !important;
    font-weight: 600 !important;
    border-left-color: var(--primary) !important;
    background-color: rgba(39, 127, 242, 0.1) !important;
}

/* Styles for rendered markdown in the resume modal */
#modal-resume-content h1,
#modal-resume-content h2,
#modal-resume-content h3,
#modal-resume-content h4,
#modal-resume-content h5,
#modal-resume-content h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#modal-resume-content h1 {
    font-size: 1.875rem; /* text-3xl */
    line-height: 2.25rem;
}

#modal-resume-content h2 {
    font-size: 1.5rem; /* text-2xl */
    line-height: 2rem;
}

#modal-resume-content h3 {
    font-size: 1.25rem; /* text-xl */
    line-height: 1.75rem;
}

#modal-resume-content p {
    margin-bottom: 1rem;
}

#modal-resume-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#modal-resume-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#modal-resume-content li {
    margin-bottom: 0.5rem;
}

#modal-resume-content strong {
    font-weight: 600;
}

#modal-resume-content em {
    font-style: italic;
}

/* Account Page Specific Styles */
#subscription-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.btn-job-action {
    min-width: 110px;
}

.btn-candidate-status {
    min-width: 90px;
}

/* Sidebar layout refinements */
#sidebar .sidebar-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    padding-bottom: 0;
}

#sidebar .sidebar-footer {
    background-color: var(--white);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

@media (min-width: 768px) {
    #sidebar {
        scrollbar-width: thin;
    }

    #sidebar::-webkit-scrollbar {
        width: 8px;
    }

    #sidebar::-webkit-scrollbar-thumb {
        background-color: var(--light-gray);
        border-radius: 9999px;
    }

    #sidebar .sidebar-footer {
        box-shadow: 0 -12px 16px -12px rgba(26, 26, 26, 0.15);
    }
}
