html,
body {
    overflow-x: hidden;
    width: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #0f2027, #000);
    color: white;
    font-family: Segoe UI;
}

.container {
    max-width: 800px;
    margin: 60px auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.subtitle {
    color: #aaa;
    margin-bottom: 30px;
    transition: 0.3s;
    cursor: pointer;
}

.subtitle:hover {
    color: #00f5ff;
    text-shadow: 0 0 10px #00f5ff;
}
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.1);
}

.upload-box {
    border: 1px solid #00f5ff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.jd-box {
    border: 1px solid #7b2cff;
    padding: 15px;
    border-radius: 12px;
}

input,
textarea {
    width: 100%;
    margin-top: 10px;
    background: #111;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
}

textarea {
    resize: none;
}

button {
    margin-top: 20px;
    padding: 12px 40px;
    background: linear-gradient(45deg, #00f5ff, #7b2cff);
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
}

.loader span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: cyan;
    margin: 5px;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader span:nth-child(3) {
    animation-delay: 0.4s;
}

.hidden {
    display: none !important;
}

.result {
    margin-top: 40px;
    animation: fadeIn 1s;
}

.score-circle {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.progress {
    height: 10px;
    background: #222;
    border-radius: 20px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f5ff, #7b2cff);
    transition: 1s;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
    text-align: left;
}
.toast {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff3c3c;
    padding: 12px 30px;
    border-radius: 20px;
    transition: 0.4s;
    z-index: 9999;
}

.toast.show {
    display: block;
}


@keyframes bounce {
    to {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
    }
}

@keyframes bgMove {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(0.85);
    }
}

.resume-box {
    white-space: pre-wrap;
    background: #0f172a;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 12px;
    font-family: "Segoe UI", sans-serif;
    line-height: 1.6;
    font-size: 15px;
    max-height: none;
    overflow: visible;
    overflow-y: auto;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

#optionsBox button {
    margin: 5px;
    padding: 8px 15px;
    border-radius: 10px;
    background: #1e293b;
    color: white;
    border: 1px solid #00f5ff;
}


.answer-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin: 15px 0;
    border-radius: 12px;
    animation: fadeIn 0.5s;
    border-left: 4px solid #00f5ff;
}


/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #0f172a;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    animation: scaleUp 0.5s ease;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}
.modal.hidden {
    display: none;
}

@keyframes scaleUp {
    from {
        transform: scale(0.6);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.question-card {
    margin: 20px 0;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #ff4d4d;
}

.question-text {
    color: #ff4d4d;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.answer-text {
    margin-top: 10px;
    color: #4fdcff;
    font-size: 16px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

/* -------- JARVIS AI ORB -------- */

.ai-core {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #00f5ff, #0047ff);
    border-radius: 50%;
    box-shadow: 0 0 30px #00f5ff;
    animation: pulse 2s infinite;
}

.ai-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 90px;
    height: 90px;
    border: 2px solid rgba(0, 245, 255, 0.5);
    border-radius: 50%;
    animation: rotate 4s linear infinite;
}

/* -------- AI LOADER -------- */

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px cyan;
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px cyan;
    }

    100% {
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes scan {
    from {
        width: 0;
    }

    to {
        width: 300px;
    }
}

/* -------- JARVIS CHAT -------- */
/* Orb */
#aiOrb {
    position: fixed;
    right: 20px;
    top: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
    background: linear-gradient(45deg, #00f5ff, #7b2cff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 9999;
}

/* Loader */
.robo-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Chat */
.jarvis-chat * {
    pointer-events: auto;
}
.jarvis-chat {
    position: fixed;
    top: 50%;
    right: 20px;
    width: 380px;
    height: 520px;
    transform: translateY(-50%);
    /* not full screen */
    background: #020617;
    z-index: 99999;

    display: flex;
    flex-direction: column;

    border-radius: 18px;
    border: 2px solid gold;
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.5),
        inset 0 0 20px rgba(255, 215, 0, 0.15);

    animation: slideIn 0.4s ease;
}

.jarvis-header {
    padding: 12px;
    display: flex;
    color: white;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #020617, #111827);
    border-bottom: 1px solid gold;
}

.light-theme .jarvis-header {
    background: linear-gradient(45deg, #6366f1, #22d3ee);
    color: #0f172a;
}

.jarvis-header button {
    background: transparent;
    border: none;
    color: gold;
    font-size: 18px;
    cursor: pointer;
}

.chat-input {
    display: flex;
    padding: 10px;
}

/* CHAT BODY */
.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.chat-body::-webkit-scrollbar {
    width: 5px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: linear-gradient(#00f5ff, #7b2cff);
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

/* MESSAGES */
.user-msg {
    background: linear-gradient(45deg, #00f5ff, #7b2cff);
    color: white;
    padding: 10px 15px;
    border-radius: 14px;
    max-width: 80%;
    margin: 8px 0;
    align-self: flex-end;
}
.bot-msg {
    background: #1e293b;
    color: #4fdcff;
    padding: 10px 15px;
    border-radius: 14px;
    max-width: 80%;
    margin: 8px 0;
}

.bot-msg,
.user-msg {
    margin: 12px 0;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* INPUT */
.chat-input {
    display: flex;
    padding: 10px;
    background: #020617;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
}

.chat-input button {
    margin-left: 8px;
}

/* ANIMATION */
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .jarvis-chat {
        width: 100%;
    }
}


/* Light theme */
.light-theme {
    background: #f8fafc !important;
    color: #0f172a !important;
}

.light-theme .bot-msg {
    background: #e2e8f0;
    color: #0f172a;
}

.light-theme .user-msg {
    background: linear-gradient(45deg, #6366f1, #22d3ee);
    color: white;
}

.light-theme .chat-input {
    background: #e2e8f0;
}

.light-theme .chat-input input {
    background: white;
    color: black;
}/* ========== PDF MODE (hide UI) ========== */
body.pdf-mode .glass-card,
body.pdf-mode .jarvis-chat,
body.pdf-mode #aiOrb,
body.pdf-mode .robo-loader,
body.pdf-mode .ai-orb {
    display: none !important;
}

/* ========== PDF EXPORT CONTAINER ========== */
#pdfExport {
    background: white;
    color: black;
    padding: 40px;
    width: 800px;
    margin: auto;
    font-family: Arial, sans-serif;
}

/* Force clean look inside PDF */
#pdfExport * {
    color: black !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Headings */
#pdfExport h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

#pdfExport h2 {
    margin-top: 20px;
}

#pdfExport h3 {
    margin-top: 15px;
}

/* Lists */
#pdfExport ul {
    margin-left: 20px;
}

/* Code / resume text */
#pdfExport pre {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.5;
}

.pdf-export {
    width: 794px;
    min-height: 1123px;
    /* A4 height */
    height: auto !important;
    overflow: visible !important;
}

.mode-indicator {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #9ca3af;
}

/* ===== PRINT MODE ===== */
@media print {
    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
    }

    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

@media print {

    body {
        background: white !important;
    }

    .glass-card,
    .card,
    .result {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .resume-box {
        max-height: none !important;
        overflow: visible !important;
    }

    /* Force page breaks properly */
    h2,
    h3 {
        page-break-after: avoid;
    }

    .card {
        page-break-inside: auto;
    }
}

@media print {

    /* remove scroll limits */
    .result,
    .resume-box,
    .card {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* make whole page printable */
    body {
        overflow: visible !important;
    }

}