html, body {
    -webkit-user-select: none;
    user-select: none; 
    background-color: #3a3a3a;
    font-family: "Roboto", sans-serif;
    color: white;
    margin: 0;
    padding: 0;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

h1 {
    -webkit-user-select: none;
    user-select: none; 
    font-size: 120px;
    font-weight: 200;
    margin: 0px;
}

h2 {
    -webkit-user-select: none;
    user-select: none; 
    font-weight: 300;
    font-size: 24px;
    margin-bottom: 20px;
}

#search h1, #search h2 {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
}

.text-shrink {
    opacity: 0 !important;
    max-height: 0 !important;
    font-size: 0 !important;
    margin: 0 !important;
    pointer-events: none;
}

#logo {
    padding-right: 10px;
    padding-left: 10px;
    height: 32px;
    width: 32px;
}

#header {
    -webkit-user-select: none;
    user-select: none;
    position: fixed;
    margin-top: 0px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 45px;
    font-weight: 300;
    background-color: #555;
    border-bottom: 1px solid #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 99999999;
}

#header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.header-nav-btn {
    -webkit-user-select: none;
    user-select: none;
    margin-right: 12px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: "Outfit", sans-serif;
    color: #fff;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header-nav-btn:hover {
    color: #6a11cb;
    background: linear-gradient(45deg, #8b4df2, #5fa0ff);
    box-shadow: 0 0 10px rgba(106,17,203,0.5), 0 0 20px rgba(37,117,252,0.5);
}

#center {
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
}

#center.fade-in {
    opacity: 1;
}

.initial-state {
    padding-top: 220px;
}

.results-state {
    padding-top: 60px;
}

#search {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#name-form {
    font-family: "Outfit", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin: 0px;
}

#name-form input {
    margin-right: 10px;
    height: 42px;
    width: 300px;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 10px;
    outline: none;
    transition: border 0.5s ease, box-shadow 0.2s ease, width 0.4s ease;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

#job-description {
    font-family: "Roboto", sans-serif;
    margin-right: 10px;
    min-height: 68px;
    resize: vertical;
    width: 300px;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 10px;
    outline: none;
    transition: border 0.5s ease, box-shadow 0.2s ease, width 0.4s ease;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

#name-form button {
    -webkit-user-select: none;
    user-select: none; 
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

#name-form button:hover {
    color: #6a11cb;
    background: linear-gradient(45deg, #8b4df2, #5fa0ff);
    box-shadow: 0 0 10px rgba(106,17,203,0.5), 0 0 20px rgba(37,117,252,0.5);
    transition: 0.3s;
}

#name-form button:disabled {
    background: #555; /* Solid dark grey */
    color: #888;      /* Muted text color */
    cursor: not-allowed;
    box-shadow: none;  /* Remove the glow effect */
    transform: none;   /* Prevent any hover lifting */
}

#center-form {
    background-color: #2e2e2e;
    border: 1px solid #555;
    border-radius: 15px;
    padding: 20px 30px;
    width: 450px;
    margin: 20px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stacked-form {
    display: flex;
    flex-direction: row; 
    align-items: center; /* Centers the button vertically against the two inputs */
    justify-content: center; /* Centers the content horizontally */
    gap: 10px;
    width: 100%;
}

#input-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#center-form.expanded {
    width: 500px;
}

#stats {
    perspective: 2000px;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    image-rendering: -webkit-optimize-contrast;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    width: 92%;
    box-sizing: border-box;
    padding: 10px;
    gap: 10px;
    margin: 0 auto;
}

#stats.grid-on {
    display: grid;
}

#stats.visible {
    opacity: 1;
}

#stats > div {
    opacity: 0;
    transform: rotateY(-90deg);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.8s ease;
    height: 400px;
    box-sizing: border-box;
    background-color: #2e2e2e;
    border: 1px solid #555;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#stats > div.flipped {
    opacity: 1;
    transform: rotateY(0deg);
}

.stats-row-inner {
    margin-top: 40px;
    display: flex;
    flex-direction: row;
    width: 100%;
    max-height: 250px;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.stats-row-left {
    flex: 0 0 200px; /* Keeps the ring area fixed */
    margin-left: 5px;
    display: flex;
    min-width: 240px;
}

.stats-row-right {
    flex: 1; /* Text takes up the rest of the space */
    border-left: 1px solid #444; /* Optional separator line */
    padding-left: 10px;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Full-width row cards (Top Language, Quick Stats): span both columns */
.stats-box-fullrow {
    grid-column: 1 / -1;
}

.stats-box-fullrow .stats-row-inner {
    display: flex;
    flex-direction: row;
    flex: 1;
    width: 100%;
    min-height: 0;
    gap: 24px;
    padding: 0 20px 20px;
}

.stats-box-fullrow .stats-row-left {
    flex: 0 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-box-fullrow .stats-row-right {
    flex: 0 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 16px;
    border-left: 1px solid #444;
}

.card-extra-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.card-extra-label-mt {
    margin-top: 1rem;
}

.card-extra-value {
    font-size: 32px;
    font-weight: 700;
    font-family: "Outfit", sans-serif;
    color: #7cff7c;
}

.card-extra-value.no-ai {
    color: #888;
}

.card-extra-sublabel {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.card-extra-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #ccc;
}

.card-extra-list li {
    margin-bottom: 4px;
}

.card-extra-activity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #bbb;
}

.card-extra-stat {
    display: block;
}

.refresh-flip-360 {
    animation: box-flip-360 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes box-flip-360 {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

@media (max-width: 1441px) {
    #stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    #stats {
        grid-template-columns: 1fr;
    }
}

.stats-box {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    font-family: "Outfit", sans-serif;
    overflow: hidden;
}

#chart-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}

#language-chart {
    max-height: 100% !important; 
    width: auto !important;
}

.box-header {
    padding-top: 20px;
    font-size: 28px;
}

.quick-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
}

.mini-stat:not(:last-child) {
    border-right: 1px solid #555;
}

.mini-label {
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-icon {
    position: absolute;
    margin-top: 90px;
    width: 120px; 
    height: 120px;
    opacity: 0.2; /* Makes the PNG transparent/subtle */
    pointer-events: none; /* Ensures the icon doesn't block hover events on the chart/text */
    z-index: 1;
}

#fork-icon {
    width: 100px; 
    height: 150px;
}

.mini-value {
    position: relative;
    margin-top: 90px;
    z-index: 2; /* Keeps the text on top of the star */
    font-size: 36px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.icon-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#scroll-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(58, 58, 58, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 20px;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.5s ease;
    opacity: 0;
}

#scroll-indicator.visible {
    opacity: 1;
}

#scroll-indicator span {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    margin-bottom: 5px;
}

#profile-card {
    display: none;
    opacity: 0;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: opacity 1s ease;
}

#profile-card.layout-on {
    display: flex;
}

#profile-card.visible {
    opacity: 1;
}

#user-avatar {
    margin-right: 22px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 7px rgba(255, 255, 255, 255);
}

#user-display-name {
    font-family: "Outfit", sans-serif;
    font-size: clamp(24px, 4vw, 42px);
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: white;
}

.error-shake {
    animation: shake 0.1s ease-in-out 1;
    border: 2px solid #ff4b2b !important; 
    box-shadow: 0 0 10px rgba(255, 75, 43, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* AI report card (box 3) */
.progress-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
    width: 200px; /* Match SVG width */
    height: 200px; /* Match SVG height */
    margin-left: auto;
    margin-right: auto;
}

.progress-ring {
    transform: rotate(-90deg); /* Start the ring at the top (12 o'clock) */
}

.progress-ring__circle {
    /* Circumference = 2 * PI * R = 2 * 3.14 * 80 ≈ 502 */
    stroke-dasharray: 503;
    stroke-dashoffset: 503; /* Initially hidden */
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}

.ai-score-number {
    position: absolute; /* Place number inside the ring */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    font-size: 70px;
    font-weight: 700;
    color: #ffffff;
    margin: 10px 0;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 10px currentColor;
}
.ai-score-number.no-ai { color: #666; }
.ai-recommendation-short {
    font-size: 14px;
    color: #bbb;
    line-height: 1.4;
    padding: 0 15px;
    height: auto; 
    display: block;
    overflow-y: auto;
    min-height: 0;
    text-align: left;
    margin-top: 0px;
    margin-bottom: 10px;
}
.ai-no-report {
    font-size: 13px;
    color: #888;
    padding: 0 15px;
    margin: 10px 0;
    text-align: center;
}
.hidden { display: none !important; }

/* Strengths & weaknesses (box 4) */
#sw-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Force exactly two equal columns */
    align-items: start;
    width: 100%;
    max-height: 300px;
    padding: 20px 20px 20px;
    gap: 0; /* We will use borders and padding for spacing */
    box-sizing: border-box;
}

.sw-grid-stat {
    display: flex;
    flex-direction: column;
    max-height: 300px;
    
    padding: 0 15px;
    min-width: 0; /* Crucial: allows text to wrap instead of pushing width */

    overflow-y: auto;
}

.sw-grid-stat:first-child {
    border-right: 1px solid #555;
}

.sw-label {
    font-size: 14px;
    color: #8b4df2;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.sw-grid-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
    list-style-type: disc;
}

.sw-grid-list li {
    margin-bottom: 8px;
}

#strengths-list, #weaknesses-list {
    margin: 0;
    padding-left: 18px; /* Room for bullets */
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    list-style-type: disc;
    word-wrap: break-word; /* Force long words to wrap */
}

/* Download PDF button */
.download-pdf-wrap {
    width: 92%;
    max-width: 1000px;
    margin: 20px auto 0;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.download-pdf-wrap.hidden { display: none; }
.download-pdf-btn,
.create-slides-btn {
    font-family: "Outfit", sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    color: #fff;
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.download-pdf-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
}
.download-pdf-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* AI report more section (below grid) */
.ai-report-more {
    -webkit-user-select: text;
    user-select: text; 
    width: 92%;
    max-width: 1000px;
    margin: 30px auto 60px;
    padding: 24px;
    background-color: #2e2e2e;
    border: 1px solid #555;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: "Outfit", sans-serif;
}
.ai-more-title {
    font-size: 22px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 20px 0;
}
.ai-more-block {
    margin-bottom: 20px;
}
.ai-more-block:last-child { margin-bottom: 0; }
.ai-more-label {
    font-size: 12px;
    color: #8b4df2;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}
.ai-more-block p,
.ai-more-block ul {
    margin: 0;
    font-size: 15px;
    color: #ccc;
    line-height: 1.6;
}
.ai-more-block ul { padding-left: 20px; }
.ai-more-block ul li { margin-bottom: 6px; }

/* Analyzing state (AI analysis in progress) */
.analyzing-status {
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.2), rgba(37, 117, 252, 0.15));
    border: 1px solid rgba(139, 77, 242, 0.4);
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}
.analyzing-status.hidden { display: none !important; }
#analyzing-text {
    display: block;
    font-size: 15px;
    color: #ccc;
    margin-bottom: 6px;
}
#analyzing-progress {
    display: block;
    font-size: 13px;
    color: #8b4df2;
    margin-bottom: 10px;
}
.analyzing-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.analyzing-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    border-radius: 3px;
    width: 0%;
    transition: width 0.35s ease-out;
}

/* 1. Chrome, Safari, and newer Edge */
.sw-grid-stat::-webkit-scrollbar,
.ai-recommendation-short::-webkit-scrollbar {
    width: 6px; /* Narrow width */
}

.sw-grid-stat::-webkit-scrollbar-track,
.ai-recommendation-short::-webkit-scrollbar-track {
    background: #2e2e2e; /* Matches box background */
    border-radius: 10px;
}

.sw-grid-stat::-webkit-scrollbar-thumb,
.ai-recommendation-short::-webkit-scrollbar-thumb {
    background: #444; /* Slightly lighter so it's visible but subtle */
    border-radius: 10px;
    border: 1px solid #2e2e2e; /* Adds a "gap" effect */
}

.sw-grid-stat::-webkit-scrollbar-thumb:hover,
.ai-recommendation-short::-webkit-scrollbar-thumb:hover {
    background: #8b4df2; /* Purple accent on hover */
}

/* 2. Firefox Support */
.sw-grid-stat,
.ai-recommendation-short {
    scrollbar-width: thin;
    scrollbar-color: #444 #2e2e2e; /* thumb color | track color */
}

#tech-highlights-list, 
#improvement-suggestions-list {
    /* Resets the default ul behavior */
    margin: 0;
    padding: 20px 30px 20px 45px; /* Extra left padding for the bullets */
    
    /* Centering Logic */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers items vertically in the box */
    flex: 1; 
    
    /* Standard Bullets */
    list-style-type: disc;
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
}

#tech-highlights-list li, 
#improvement-suggestions-list li {
    margin-bottom: 12px;
    display: list-item;
    max-width: 100%;
    margin-left: 10px;
}

#substats {
    display: flex;
    justify-content: center; /* Centers the whole group */
    align-items: flex-start;
    width: 100%;
    padding: 9 0 10px 0;
    gap: 40px; /* This is your fixed distance between each stat */
    grid-column: 1 / -1; /* Ensures it spans the full width of the grid */
    height: 120px; 
    box-sizing: border-box;
}

.mini-progress-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px; /* Fixed width for each column to keep text aligned */
    gap: 12px;    /* Fixed distance between ring and label */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.mini-progress-wrapper:hover {
    transform: scale(1.15);
    z-index: 10; /* Ensures the hovered stat sits on top of others */
}

.mini-progress-wrapper:hover .progress-ring__circle {
    filter: drop-shadow(0 0 3px currentColor);
}

.mini-progress-wrapper:hover .mini-ai-score-number {
    filter: drop-shadow(0 0 3px currentColor);
}

.mini-progress-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mini-ai-score-number {
    position: absolute;
    font-size: 22px; /* Smaller font for mini rings */
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    filter: drop-shadow(0 0 2px currentColor);
}

.mini-ring-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    transition: all 0.3s ease;
}

.mini-progress-wrapper:hover .mini-ring-label {
    color: #fff;
    font-weight: 500;
    font-size: 12px;
}

.progress-ring__circle {
    filter: drop-shadow(0 0 2px currentColor);
}

/* Circumference for R=34 is ~213.6 */
.mini-progress-ring .progress-ring__circle {
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

/* Enterprise portal cards */
#enterprise-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
    padding: 20px;
    box-sizing: border-box;
}

.enterprise-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background-color: #444;
    border-radius: 12px;
    border: 1px solid #555;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}

.enterprise-card:hover {
    background-color: #505050;
    transform: translateY(-2px);
}

.enterprise-card-loading {
    pointer-events: none;
    opacity: 0.7;
}

.enterprise-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.enterprise-card-username {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.enterprise-card-score {
    font-size: 18px;
    font-weight: 700;
    color: #8f8;
}

#enterprise-loading,
#enterprise-empty {
    text-align: center;
    color: #aaa;
    padding: 24px;
}

#enterprise-empty.hidden,
#enterprise-loading.hidden {
    display: none;
}