/* PP Mondwest Font */
@font-face {
    font-family: 'PP Mondwest';
    src: url('fonts/PPMondwest-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* PP NeueBit Bold */
@font-face {
    font-family: 'PP NeueBit';
    src: url('fonts/PPNeueBit-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables - Dark Mode (Default) */
:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: #141414;
    --text-primary: #FAFAFA;
    --text-secondary: #888888;
    --text-muted: #666666;
    --accent: #FF4F18;
    --accent-hover: #FF6B3D;
    --border: #222222;
    --border-hover: #333333;
}

/* CSS Variables - Light Mode */
:root.light-mode {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFFFFF;
    --text-primary: #0A0A0A;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent: #000000;
    --accent-hover: #000000;
    --border: #E5E5E5;
    --border-hover: #CCCCCC;
}

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

body {
    font-family: 'PP Mondwest', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Use PP NeueBit for bold/headers */
h1, h2, h3, .logo, strong, b {
    font-family: 'PP NeueBit', 'PP Mondwest', sans-serif;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    padding: 40px 32px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 32px;
}

.logo {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.sidebar-nav {
    display: flex;
    gap: 16px;
}

.nav-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--accent-hover);
}

/* Info Collapsible (Submit Info) */
.info-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.info-collapse.active {
    max-height: 100px;
    opacity: 1;
    margin-top: 16px;
}

.info-content {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--bg-card);
}

.info-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.info-text:last-child {
    margin-bottom: 0;
}

/* Subscribe Collapsible */
.subscribe-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.subscribe-collapse.active {
    max-height: 100px;
    opacity: 1;
    margin-top: 16px;
}

.subscribe-form {
    display: flex;
    gap: 8px;
}

.subscribe-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

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

.subscribe-input::placeholder {
    color: var(--text-muted);
}

.subscribe-btn {
    padding: 10px 14px;
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.subscribe-btn:hover {
    background-color: var(--accent-hover);
}

.subscribe-feedback {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subscribe-feedback.show {
    opacity: 1;
}

.subscribe-feedback.success {
    color: #f87171;
}

.subscribe-feedback.error {
    color: #f87171;
}

.sidebar-content {
    flex: 1;
}

.description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.job-characteristics {
    list-style: none;
    margin-bottom: 32px;
}

.job-characteristics li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.submit-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    transition: background-color 0.2s;
}

.submit-link:hover {
    background-color: var(--accent-hover);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-footer p {
    margin-bottom: 4px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 48px;
    max-width: calc(100vw - 320px);
    background-color: var(--bg-primary);
}

.tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.tab {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s;
    font-family: inherit;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 700;
}

/* Jobs Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.job-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.job-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.company-logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    margin-bottom: 16px;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary);
    overflow: hidden;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.company-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.job-title {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.job-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.job-salary {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.apply-button {
    width: 100%;
    padding: 10px 16px;
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.apply-button:hover {
    background-color: var(--accent-hover);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
}

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

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    margin: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-instructions {
    flex: 1;
}

.modal-instructions p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.modal-instructions p:first-child {
    font-weight: 700;
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--accent);
}

.submit-form {
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
}

.submit-form h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    grid-column: 1 / -1;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background-color: var(--bg-card);
    color: var(--text-primary);
}

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

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.payment-button {
    width: 100%;
    padding: 16px;
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
    margin-top: 8px;
    grid-column: 1 / -1;
}

.payment-button:hover {
    background-color: var(--accent-hover);
}

.payment-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 24px;
    }

    .main-content {
        max-width: 100%;
        padding: 32px 24px;
    }

    .jobs-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

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

    .main-content {
        padding: 24px 16px;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .modal-header,
    .submit-form {
        padding: 24px;
    }

    .submit-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .tabs {
        gap: 16px;
    }

    .tab {
        font-size: 14px;
    }

    .modal-header,
    .submit-form {
        padding: 20px;
    }

    .submit-form {
        grid-template-columns: 1fr;
    }
}
