/* Resume Component Styles */

.base-item {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--surface), #1a1f2e);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.base-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.base-item.selected::before {
    opacity: 1;
}

.base-item:hover {
    border-color: var(--primary-dim);
    transform: translateY(-2px);
    z-index: 5;
}

.base-item.selected {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.2);
}

.base-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.info-tag i {
    font-size: 0.9rem;
    color: var(--primary);
    opacity: 0.8;
}

.resume-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem;
    /* Reduced from 1.5rem */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.resume-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(123, 44, 191, 0.3);
    z-index: 10;
}

.card-type {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.card-type.base {
    background: var(--primary-dim);
    color: var(--primary);
}

.card-type.tailored {
    background: rgba(123, 44, 191, 0.2);
    color: #c77dff;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-right: 3rem;
    word-break: break-all;
}

.card-company {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.8rem 0;
}

.tag-pill {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--primary);
    backdrop-filter: blur(4px);
}

.delete-trigger:hover {
    opacity: 1 !important;
    color: #ff4d4f;
}

/* Card Export Menu */
.card-export-dropdown {
    position: relative;
}

.card-export-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 160px;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.card-export-menu.active {
    display: flex;
}

.card-export-item {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
}

.card-export-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.card-export-item i {
    font-size: 1.1rem;
}

/* JD Matching Modal Redesign */
.jd-matching-modal {
    max-width: 600px !important;
    padding: 3rem !important;
    background: #0f172a !important;
    /* Specific dark background */
}

.jd-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 2.5rem;
}

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

.jd-label {
    display: block;
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 0.8rem;
}

.jd-input,
.jd-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.jd-input:focus,
.jd-textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

.jd-textarea {
    height: 200px;
    resize: none;
    line-height: 1.6;
}

.jd-footer {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.jd-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: flex-end;
}

.jd-btn {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.jd-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.jd-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
}

.jd-btn-optimize {
    background: #38bdf8;
    border: none;
    color: #000;
    flex: 0 1 200px;
}

.jd-btn-optimize:hover {
    background: #7dd3fc;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

.jd-cost-info {
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 0.5rem;
}

/* JD Matching Loader Redesign */
.matching-loader {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    min-height: 250px;
    animation: zoom-in 0.4s ease-out;
}

.scanner-box {
    width: 80px;
    height: 80px;
    border: 2px solid var(--primary-dim);
    border-radius: 16px;
    background: rgba(56, 189, 248, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scanner-icon {
    font-size: 2.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    box-shadow: 0 0 15px var(--primary);
    animation: scan 2s linear infinite;
    z-index: 2;
}

.loader-status {
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.loader-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    max-width: 360px;
    line-height: 1.6;
}

@keyframes scan {
    0% {
        top: -4px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}