/* Global Reset and Body Styles */
:root {
    /* Light Theme Variables - Electric Blue and Gray */
    --background-default-light: #f5f5f5;
    --background-paper-light: #ffffff;
    --text-primary-light: #212121;
    --text-secondary-light: #616161;
    --primary-color-light: #2196f3; /* A bright, vibrant blue */
    --primary-gradient-light-start: #004e92;
    --primary-gradient-light-end: #00d2ff;
    --secondary-color-light: #bdc3c7; /* A cool, light gray */
    --secondary-gradient-light-start: #ECE9E6;
    --secondary-gradient-light-end: #FFFFFF;
    --success-color-light: #2196f3;
    --warning-color-light: #E57373;
    --info-color-light: #546E7A;
    --border-color-light: #e0e0e0;
    --input-focus-border-light: #2196f3;
    --card-shadow-light: 0px 4px 10px rgba(0, 0, 0, 0.1);

    /* Common Styles */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --padding-md: 24px;
    --padding-lg: 48px;
}

body.dark-mode {
    /* Dark Theme Variables - Electric Blue and Gray */
    --background-default-dark: #212121;
    --background-paper-dark: #282828; 
    --text-primary-dark: #fff; 
    --text-secondary-dark: #b0b0b0; 
    --primary-color-dark: #8ec5fc; /* Lighter blue for dark mode */
    --primary-gradient-dark-start: #000428;
    --primary-gradient-dark-end: #004e92;
    --secondary-color-dark: #424242;
    --secondary-gradient-dark-start: #232526;
    --secondary-gradient-dark-end: #414345;
    --success-color-dark: #8ec5fc;
    --warning-color-dark: #EF5350;
    --info-color-dark: #607D8B;
    --border-color-dark: #424242; 
    --input-focus-border-dark: #8ec5fc; 
    --card-shadow-dark: 0px 4px 15px rgba(0, 0, 0, 0.5); 
}

#resumePreviewContainer {
    position: relative;
    width: 100%;
    max-width: 425px;
    margin: 0 auto;
    padding-top: 129.4%;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color-light);
    background-color: var(--border-color-light);
    box-shadow:
      0 6px 16px rgba(0, 0, 0, 0.20),
      0 12px 32px rgba(128, 0, 128, 0.30);
}


#resumePreviewContainer img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}
@media (min-width: 768px) {
  #resumePreviewContainer {
    padding: 0;
    height: auto;
    max-width: 900px;
    margin: 0 auto;
    background-color: transparent;
    border: none;
  }
  #resumePreviewContainer img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
  }
}
@media (min-width: 768px) {
  #resumePreviewContainer {
    outline: 1px solid var(--border-color, var(--border-color-light, rgba(0,0,0,0.12)));
    border-radius: var(--radius-md, 12px);
    box-shadow:
      var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08)),
      var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.06));
    background-color: var(--surface, #fff);
  }
}

#resumePreviewContainer {
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.20),
    0 12px 32px rgba(128, 0, 128, 0.30) !important;
  border-radius: var(--border-radius-md, 12px) !important;
  background-color: var(--background-paper-light, #fff) !important;
}



.intake-path-button-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
    border-bottom: 1px dashed var(--border-color-light);
    padding-bottom: 24px;
}

body.dark-mode .intake-path-button-group {
    border-bottom-color: var(--border-color-dark);
}

.intake-path-button-group .button.disabled {
    background: var(--border-color-light) !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    animation: none;
    color: var(--text-secondary-light);
}

body.dark-mode .intake-path-button-group .button.disabled {
    background: var(--border-color-dark) !important;
    color: var(--text-secondary-dark);
}

.form-field .helper-text {
    font-size: 0.8rem;
    color: var(--text-secondary-light);
    margin-top: 4px;
}

body.dark-mode .form-field .helper-text {
    color: var(--text-secondary-dark);
}

.repeatable-group {
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    padding: 24px 16px 16px 16px;
    margin-bottom: 24px;
    position: relative;
}

body.dark-mode .repeatable-group {
    border-color: var(--border-color-dark);
}

.remove-group-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none !important;
    border: none;
    color: var(--text-secondary-light) !important;
    cursor: pointer;
    width: 36px !important;
    height: 36px;
    padding: 0 !important;
    min-width: 36px;
}

body.dark-mode .remove-group-btn {
    color: var(--text-secondary-dark) !important;
}

.remove-group-btn:hover {
    color: #d32f2f !important;
    background-color: rgba(211, 47, 47, 0.1) !important;
}

#resumePreviewContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color-light);
}

.section-toggle:last-of-type {
    border-bottom: none;
}

.section-toggle label {
    flex-grow: 1;
    font-weight: normal;
    color: var(--text-primary-light);
    cursor: pointer;
}

body.dark-mode .section-toggle label {
    color: var(--text-primary-dark);
}

.section-toggle label p {
    margin-top: 2px;
    margin-bottom: 0;
}

.section-toggle input[type="checkbox"] {
    margin-left: 10px;
    transform: scale(1.2);
    accent-color: var(--primary-color-light);
    flex-shrink: 0;
    margin-top: 4px;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: var(--background-default-light);
    color: var(--text-primary-light);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.dark-mode {
    background-color: var(--background-default-dark);
    color: var(--text-primary-dark);
}

#app {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

* {
    box-sizing: border-box;
}

/* Site Footer Styles */
.site-footer {
    width: 100%;
    margin-top: auto;
    padding: 24px 16px;
    background: var(--background-paper-light);
    color: var(--text-secondary-light);
    font-size: 14px;
    border-top: 1px solid var(--border-color-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styles for Collapsible Resume Styles */
.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: bold;
    color: var(--primary-color-light);
}

.collapsible-header:hover {
    border-color: var(--primary-color-light);
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3); /* Updated shadow for new primary color */
}

body.dark-mode .collapsible-header:hover {
    border-color: var(--primary-color-dark);
    box-shadow: 0 0 5px rgba(142, 197, 252, 0.3); /* Updated shadow for new primary color */
}

.collapsible-header .material-icons {
    transition: transform 0.3s ease-in-out;
}

.collapsible-header.active .material-icons {
    transform: rotate(90deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-left: 15px;
    border-left: 3px solid var(--primary-color-light);
    margin-bottom: 15px;
}

.collapsible-content.show {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.site-footer .footer-link {
    color: var(--primary-color-light);
    text-decoration: underline;
    cursor: pointer;
}

.site-footer .footer-link:hover {
    color: var(--accent-color-light);
}

.site-footer .footer-legal {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary-light);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

body.dark-mode .site-footer {
    background: var(--background-paper-dark);
    color: var(--text-secondary-dark);
    border-top: 1px solid var(--border-color-dark);
}

body.dark-mode .footer-link {
    color: var(--primary-color-dark);
}

body.dark-mode .footer-link:hover {
    color: var(--accent-color-dark);
}

/* Custom Alert Modal Styles */
.custom-alert-overlay {
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(20, 24, 30, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadein 0.18s;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.custom-alert-modal {
    background: var(--background-paper-light);
    color: var(--text-primary-light);
    border-radius: 20px;
    box-shadow: 0 6px 32px rgba(44,51,73,0.14);
    min-width: 320px;
    max-width: 90vw;
    padding: 32px 28px 20px 28px;
    position: relative;
    text-align: center;
    animation: fadein 0.2s;
    max-height: 90vh;
    overflow-y: auto;
}

body.dark-mode .custom-alert-modal {
    background: var(--background-paper-dark);
    color: var(--text-primary-dark);
}

.custom-alert-icon {
    font-size: 48px;
    margin-bottom: 14px;
}

.custom-alert-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.custom-alert-message {
    font-size: 1rem;
    color: var(--text-secondary-light);
    margin-bottom: 20px;
}

body.dark-mode .custom-alert-message {
    color: var(--text-secondary-dark);
}

.custom-alert-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-secondary-light);
    cursor: pointer;
    padding: 0;
    transition: color 0.18s;
}

.custom-alert-close:hover {
    color: var(--primary-color-light);
}

body.dark-mode .custom-alert-close:hover {
    color: var(--primary-color-dark);
}

/* Button styles for modals */
.custom-alert-button {
    padding: 12px 32px;
    margin-top: 8px;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    background-size: 200% auto;
    background-image: linear-gradient(135deg, #283593 0%, #2196f3 50%, #7986cb 100%);
    border-bottom: 2px solid #283593;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-alert-button:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 150%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 25%);
    transform: rotate(25deg);
    pointer-events: none;
}

.custom-alert-button:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0px 6px 15px rgba(63, 81, 181, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.custom-alert-button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .custom-alert-button {
    background-image: linear-gradient(135deg, #5c6bc0 0%, var(--primary-color-dark) 50%, #c5cae9 100%);
    border-bottom-color: #5c6bc0;
}

.custom-alert-button:disabled {
    background-image: none !important;
    background-color: #cccccc;
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
    border-bottom: 2px solid #b0b0b0;
    transform: none;
}

.custom-alert-button:disabled:before {
    display: none;
}

body.dark-mode .custom-alert-button:disabled {
    background-color: #424242;
    color: #999999;
    border-bottom-color: #333333;
}

.document-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--background-default-light);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    margin-top: 15px;
}

body.dark-mode .document-placeholder {
    background-color: var(--background-default-dark);
    border-color: var(--border-color-dark);
}

.document-placeholder .material-icons {
    font-size: 36px;
    color: var(--primary-color-light);
    margin-right: 16px;
}

body.dark-mode .document-placeholder .material-icons {
    color: var(--primary-color-dark);
}

.document-placeholder span {
    font-weight: bold;
    color: var(--text-primary-light);
    flex-grow: 1;
}

body.dark-mode .document-placeholder span {
    color: var(--text-primary-dark);
}

.document-placeholder .button, .document-placeholder a.button {
    margin: 0;
    width: auto;
    min-width: 120px;
    padding: 8px 16px;
    font-size: 14px;
    flex-shrink: 0;
}

.modal-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.text-report-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    white-space: pre-wrap;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    max-height: 50vh;
    overflow-y: auto;
    color: var(--text-primary-light);
}

body.dark-mode .text-report-container {
    background-color: #333333;
    border-color: #555555;
    color: var(--text-primary-dark);
}

.splash-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: var(--padding-md);
    box-sizing: border-box;
}

.splash-icon {
    font-size: 120px;
    margin-bottom: 32px;
    color: var(--primary-color-light);
}

body.dark-mode .splash-icon {
    color: var(--primary-color-dark);
}

.gradient-text, .gradient-icon {
    background: linear-gradient(to right, #8A2BE2, #4169E1, #32CD32, #FFD700, #FF8C00, #FF4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradient-flow 1.5s linear infinite alternate;
    display: inline-block;
    vertical-align: middle;
}

@keyframes gradient-flow {
    0% { background-position: 0% center; }
    100% { background-position: 100% center; }
}

.splash-loading-text {
    font-size: 16px;
    color: var(--text-secondary-light);
    margin-top: 16px;
}

body.dark-mode .splash-loading-text {
    color: var(--text-secondary-dark);
}

.progress-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

body.dark-mode .progress-spinner {
    border-top: 4px solid var(--primary-color-dark);
    border-color: var(--border-color-dark);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

html, body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.page-container {
    /* Rest of the styles */
    height: 100%; /* Make the container fill the height of the body */
    overflow-y: auto; /* Enable vertical scrolling within the container */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-grow: 1;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
}

.card {
    background-color: var(--background-paper-light);
    padding: var(--padding-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--card-shadow-light);
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

body.dark-mode .card {
    background-color: var(--background-paper-dark);
    box-shadow: var(--card-shadow-dark);
}

.app-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 16px;
    min-height: 48px;
    background-image: linear-gradient(120deg, #001f3f 0%, #004e92 100%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    color: white;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
}

body.dark-mode .app-bar {
    background-image: linear-gradient(120deg, #101820 0%, #202c39 100%);
    color: var(--text-primary-dark);
    border-bottom: 1px solid var(--border-color-dark);
}

.app-bar-title {
    justify-self: center;
    font-size: 1rem;
    font-weight: bold;
}

.app-bar-title .gradient-text {
    font-size: inherit;
    animation: gradient-flow 3s ease-in-out infinite;
}

.app-bar-right-controls {
    display: flex;
    justify-content: flex-end;
}

.app-bar-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.app-bar-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .app-bar-button:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.app-bar-button .material-icons {
    font-size: 28px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-primary-light);
}

body.dark-mode .form-field label {
    color: var(--text-secondary-dark);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="url"],
.form-field input[type="tel"],
.form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    box-sizing: border-box;
    font-size: 16px;
    color: var(--text-primary-light);
    background-color: var(--background-paper-light);
    transition: border-color 0.3s ease-in-out;
}

body.dark-mode .form-field input,
body.dark-mode .form-field textarea {
    background-color: var(--background-paper-dark);
    border-color: var(--border-color-dark);
    color: var(--text-primary-dark);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--input-focus-border-light);
    border-width: 2px;
}

body.dark-mode .form-field input:focus,
body.dark-mode .form-field textarea:focus {
    border-color: var(--input-focus-border-dark);
}

.form-field textarea.na-disabled-textarea {
    background-color: #e0e0e0 !important;
    color: var(--text-secondary-light);
    cursor: not-allowed;
    opacity: 0.7;
}

body.dark-mode .form-field textarea.na-disabled-textarea {
    background-color: var(--background-default-dark) !important;
    color: var(--text-secondary-dark);
}

/* Buttons */
.button {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background-size: 200% auto;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}


@keyframes sparkle {
    0% { box-shadow: 0 0 0px 0px rgba(255, 255, 255, 0.6); }
    50% { box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0px 0px rgba(255, 255, 255, 0.6); }
}

.button:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3),
                0 0 20px 5px var(--hover-sparkle-color);
    animation: sparkle 1s linear infinite;
}

.button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(0, 0, 0, 0.2);
}

.button .material-icons {
    margin-right: 12px;
}

/* Primary Button - Electric Blue */
.button.primary {
background-image: linear-gradient(135deg, #4169E1 0%, #D8BFD8 100%);
    --hover-sparkle-color: rgba(0, 210, 255, 0.8);
}

body.dark-mode .button.primary {
    background-image: linear-gradient(120deg, #000428 0%, #004e92 100%);
}

/* Success Button - Darker Blue */
.button.success {
    background-image: linear-gradient(135deg, #00366D 0%, #008AC9 100%);
    color: white;
    --hover-sparkle-color: rgba(0, 138, 201, 0.8);
}

body.dark-mode .button.success {
    background-image: linear-gradient(135deg, #00021A 0%, #002C5E 100%);
    color: white;
}

/* Warning Button - Red */
.button.warning {
    background-image: linear-gradient(135deg, #B71C1C 0%, #FFCDD2 100%);
    color: white;
    --hover-sparkle-color: rgba(255, 205, 210, 0.8);
}

body.dark-mode .button.warning {
    background-image: linear-gradient(135deg, #C62828 0%, #E57373 100%);
    color: white;
}

/* Info Button - Blue-Gray */
.button.info {
    background-image: linear-gradient(135deg, #37474F 0%, #B0BEC5 100%);
    color: white;
    --hover-sparkle-color: rgba(176, 190, 197, 0.8);
}

body.dark-mode .button.info {
    background-image: linear-gradient(135deg, #37474F 0%, #90A4AE 100%);
}

/* Secondary Button - Gray */
.button.secondary {
    background-image: linear-gradient(120deg, #e0e0e0 0%, #ffffff 100%);
    background-color: #e0e0e0;
    color: var(--text-primary-light);
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
    --hover-sparkle-color: rgba(255, 255, 255, 0.8);
}

.button.secondary:hover:not(:disabled) {
    background-color: #cccccc;
}

body.dark-mode .button.secondary {
    background-image: linear-gradient(120deg, #2e2e2e 0%, #424242 100%);
    background-color: #424242;
    color: var(--text-primary-dark);
}

body.dark-mode .button.secondary:hover:not(:disabled) {
    background-color: #555555;
}

/* Disabled State */
.button:disabled {
    background-color: #cccccc;
    background-image: none !important;
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.button:disabled:before {
    display: none;
}

body.dark-mode .button:disabled {
    background-color: #424242;
    color: #999999;
}

/* Text Links */
.text-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: var(--primary-color-light);
    text-decoration: none;
    font-size: 14px;
}

body.dark-mode .text-link {
    color: var(--primary-color-dark);
}

.text-link:hover {
    text-decoration: underline;
}

/* Utility Classes */
.text-center {
    text-align: center;
    width: 100%;
}

.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* Styles for checkboxes in GenerateDocumentsPage */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: var(--text-primary-light);
}

body.dark-mode .checkbox-item {
    color: var(--text-primary-dark);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 5px;
    transform: scale(1.2);
    accent-color: var(--primary-color-light);
}

body.dark-mode .checkbox-item input[type="checkbox"] {
    accent-color: var(--primary-color-dark);
}

.checkbox-item label {
    flex-grow: 1;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-item label b {
    color: var(--text-primary-light);
}

body.dark-mode .checkbox-item label b {
    color: var(--text-primary-dark);
}

/* Animations for GenerateDocuments Button */
@keyframes gradient-animation {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    :root {
        --padding-md: 16px;
        --padding-lg: 24px;
    }

    .splash-icon {
        font-size: 80px;
    }

    .gradient-text {
        font-size: 24px;
    }

    .card {
        padding: var(--padding-md);
    }

    .app-bar-title {
        font-size: 22px;
    }

    .button {
        font-size: 16px;
        padding: 14px 20px;
    }
}

@media (max-width: 600px) {
  .app-bar {
    min-height: 48px;
  }

  .app-bar-title {
    font-size: 1rem;
  }
}

/* --- Redesigned Job History Styles --- */
.history-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    align-content: flex-start;
}

.history-card {
    background-color: var(--background-paper-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--card-shadow-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 5px solid var(--primary-color-light);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.12);
}

body.dark-mode .history-card {
    background-color: var(--background-paper-dark);
    box-shadow: var(--card-shadow-dark);
    border-left-color: var(--primary-color-dark);
}

body.dark-mode .history-card:hover {
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.6);
}

.history-card-header {
    margin-bottom: 16px;
}

.history-card-title {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text-primary-light);
}

body.dark-mode .history-card-title {
    color: var(--text-primary-dark);
}

.history-card-date {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary-light);
}

body.dark-mode .history-card-date {
    color: var(--text-secondary-dark);
}

.history-card-body .docs-title {
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0 0 8px 0;
    color: var(--text-primary-light);
}

body.dark-mode .history-card-body .docs-title {
    color: var(--text-primary-dark);
}

.history-card-body .docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.history-card-body .docs-list li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    color: var(--text-primary-light);
}

body.dark-mode .history-card-body .docs-list li {
    color: var(--text-primary-dark);
}

.history-card-body .docs-list li .material-icons {
    font-size: 18px;
    margin-right: 8px;
}

.history-card-body .docs-list .icon-success {
    color: var(--success-color-light);
}

.history-card-body .docs-list .icon-off {
    color: var(--border-color-light);
}

body.dark-mode .history-card-body .docs-list .icon-success {
    color: var(--success-color-dark);
}

body.dark-mode .history-card-body .docs-list .icon-off {
    color: var(--border-color-dark);
}

.history-card-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color-light);
    padding-top: 16px;
}

body.dark-mode .history-card-footer {
    border-top-color: var(--border-color-dark);
}

.applied-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.applied-toggle label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary-light);
}

body.dark-mode .applied-toggle label {
    color: var(--text-primary-dark);
}

.applied-toggle input[type="checkbox"] {
    transform: scale(1.1);
    accent-color: var(--primary-color-light);
    cursor: pointer;
}

body.dark-mode .applied-toggle input[type="checkbox"] {
    accent-color: var(--primary-color-dark);
}

.history-card-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 40px !important;
    height: 40px;
    padding: 0 !important;
    font-size: 18px !important;
    border-radius: 50% !important;
    min-width: 40px;
}

.icon-button.delete-job-btn {
    background: var(--warning-color-light) !important;
    background-color: var(--warning-color-light) !important;
}

body.dark-mode .icon-button.delete-job-btn {
    background: var(--warning-color-dark) !important;
    background-color: var(--warning-color-dark) !important;
}

.icon-button.view-details-btn {
    background: var(--info-color-light) !important;
    background-color: var(--info-color-light) !important;
}

body.dark-mode .icon-button.view-details-btn {
    background: var(--info-color-dark) !important;
    background-color: var(--info-color-dark) !important;
}

.no-history-message {
    color: var(--text-secondary-light);
}

body.dark-mode .no-history-message {
    color: var(--text-secondary-dark);
}

.no-history-message-sub {
    color: var(--text-secondary-light);
}

body.dark-mode .no-history-message-sub {
    color: var(--text-secondary-dark);
}

.no-history-icon {
    color: var(--border-color-light);
}

body.dark-mode .no-history-icon {
    color: var(--border-color-dark);
}

.screenshot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.screenshot-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screenshot-grid button {
    width: 100%;
}

.screenshot-grid img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

@media (max-width: 600px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
    }

    .screenshot-grid img {
        max-width: 90px;
        max-height: 90px;
        object-fit: contain;
    }
}

.job-specific-question-label {
    color: var(--warning-color-light);
}

body.dark-mode .job-specific-question-label {
    color: var(--warning-color-dark);
}

.profile-progress-bar {
    background: var(--primary-color-light);
}

body.dark-mode .profile-progress-bar {
    background: var(--primary-color-dark);
}

.profile-progress-bg {
    background: var(--border-color-light);
}

body.dark-mode .profile-progress-bg {
    background: var(--border-color-dark);
}

/* --- NEW: Styles for the new landscape portal --- */
#landscapeJobHistoryPortal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--background-default-light);
    color: var(--text-primary-light);
    z-index: 1000;
    overflow-y: auto;
    display: none;
    flex-direction: column;
}

body.dark-mode #landscapeJobHistoryPortal {
    background-color: var(--background-default-dark);
    color: var(--text-primary-dark);
}

@media (max-width: 991px) and (orientation: landscape) {
    #landscapeJobHistoryPortal {
        display: flex;
    }
    #app, #global-app-bar {
        display: none !important;
    }
}

@media (min-width: 992px) {
    #landscapeJobHistoryPortal {
        display: none !important;
    }
    #app {
        display: flex !important;
    }
}

/* Styles for Resume Customization Page */
.resume-style-option {
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.resume-style-option:hover {
    border-color: var(--primary-color-light);
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

body.dark-mode .resume-style-option:hover {
    border-color: var(--primary-color-dark);
    box-shadow: 0 0 5px rgba(142, 197, 252, 0.3);
}

.resume-style-option.selected {
    border-color: var(--primary-color-light);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
    background-color: rgba(33, 150, 243, 0.05);
}

body.dark-mode .resume-style-option.selected {
    border-color: var(--primary-color-dark);
    box-shadow: 0 0 8px rgba(142, 197, 252, 0.5);
    background-color: rgba(142, 197, 252, 0.08);
}

.resume-style-option h3 {
    margin: 0;
    color: var(--primary-color-light);
}

body.dark-mode .resume-style-option h3 {
    color: var(--primary-color-dark);
}

.resume-style-option .material-icons {
    font-size: 28px;
    color: var(--text-secondary-light);
}

.resume-style-option.selected .material-icons {
    color: var(--success-color-light);
}

body.dark-mode .resume-style-option.selected .material-icons {
    color: var(--success-color-dark);
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
}

body.dark-mode #splash-screen {
    background: linear-gradient(45deg, #1a1a2e, #16213e);
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color-light);
}

.section-toggle:last-of-type {
    border-bottom: none;
}

.section-toggle label {
    flex-grow: 1;
    font-weight: normal;
    color: var(--text-primary-light);
    cursor: pointer;
}

body.dark-mode .section-toggle label {
    color: var(--text-primary-dark);
}

.section-toggle input[type="checkbox"] {
    margin-left: 10px;
    transform: scale(1.2);
    accent-color: var(--primary-color-light);
}

body.dark-mode .section-toggle input[type="checkbox"] {
    accent-color: var(--primary-color-dark);
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(45deg, var(--primary-gradient-start), var(--primary-gradient-end));
}

.tooltip-wrapper .button {
  width: 100%;
}

.app-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  min-height: 60px;
  background-color: var(--primary-color-light);
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.app-bar-title {
  justify-self: center;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.app-bar-left-controls,
.app-bar-right-controls {
  display: flex;
  align-items: center;
}

.app-bar-right-controls {
  justify-content: flex-end;
}

.app-bar-button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  text-decoration: none;
}

.app-bar-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.app-bar-button .material-icons {
  font-size: 28px;
}

.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex-grow: 1;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 5;
}

.card {
  background-color: var(--background-paper-light);
  padding: 32px 24px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--card-shadow-light);
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  text-align: center;
}

.card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary-light);
  margin-top: 0;
  margin-bottom: 32px;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Enhanced Button Styles --- */
.button {
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background-size: 200% auto;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes sparkle {
  0% {
    box-shadow: 0 0 0px 0px rgba(255, 255, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0px 0px rgba(255, 255, 255, 0.6);
  }
}

.button:hover:not(:disabled) {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3),
    0 0 20px 5px var(--hover-sparkle-color);
  animation: sparkle 1s linear infinite;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(0, 0, 0, 0.2);
}

.button .material-icons {
  margin-right: 12px;
}

.button.primary {
  background-image: linear-gradient(135deg, #0A1F60 0%, #4169E1 40%, #E6F0FF 100%);
  border-bottom: 3px solid #27408B; /* Dark Royal Blue underline */
  --hover-sparkle-color: rgba(65, 105, 225, 0.8);
}



.button.primary:hover {
  border-bottom-color: #1B3A90;
}




body.dark-mode .button.primary {
  background-image: linear-gradient(120deg, #000428 0%, #004e92 100%);
}

.button.secondary {
  background-image: none;
  background-color: #757575;
}

.button.secondary:hover:not(:disabled) {
  background-color: #616161;
}

.button.sign-out {
  background-image: linear-gradient(135deg, #c62828 0%, #f44336 50%, #ef9a9a 100%);
  border-bottom: 2px solid #b71c1c;
}

.button.sign-out:hover:not(:disabled) {
  box-shadow: 0px 8px 20px rgba(211, 47, 47, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* --- Tooltip & Gradient Text --- */
.tooltip-wrapper {
  position: relative;
  display: block;
}

.tooltip-wrapper .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip-wrapper .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.gradient-text {
  background: linear-gradient(to right, #8a2be2, #4169e1, #32cd32, #ffd700, #ff8c00, #ff4500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradient-flow 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }

  100% {
    background-position: 0% center;
  }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .card {
    padding: 24px;
  }

  .card h1 {
    font-size: 1.5rem;
  }
}

/* Force mobile shadow/outline for resume preview */
@media (max-width: 767px) {
  #resumePreviewContainer {
    box-shadow:
      0 6px 16px rgba(0, 0, 0, 0.20),
      0 12px 32px rgba(128, 0, 128, 0.30) !important;
    border-radius: var(--border-radius-sm) !important;
    background-color: var(--background-paper-light) !important;
    border: 1px solid var(--border-color-light) !important;
  }
}


.royal-blue-gradient-text {
    background: linear-gradient(120deg, #001f3f 0%, #004e92 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
/* --- AI Analysis Splash Screen --- */
.analysis-modal-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 20px;
    align-items: center;
}

/* AI Equalizer Bars */
.ai-bar-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 60px;
    gap: 6px;
}

.ai-bar {
    width: 8px;
    background: var(--primary-color-light);
    border-radius: 4px;
    animation: ai-wave 2.4s infinite ease-in-out;
}

body.dark-mode .ai-bar {
    background: var(--primary-color-dark);
}

.ai-bar:nth-child(1) { animation-delay: 0s; }
.ai-bar:nth-child(2) { animation-delay: 0.1s; }
.ai-bar:nth-child(3) { animation-delay: 0.2s; }
.ai-bar:nth-child(4) { animation-delay: 0.3s; }
.ai-bar:nth-child(5) { animation-delay: 0.4s; }
.ai-bar:nth-child(6) { animation-delay: 0.5s; }
.ai-bar:nth-child(7) { animation-delay: 0.6s; }

@keyframes ai-wave {
    0% { height: 10px; }
    50% { height: 60px; }
    100% { height: 10px; }
}

/* Report Scanner Effect */
.scanner-effect-container {
    height: 80px;
    background-color: var(--background-default-light);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    padding: 8px;
    overflow: hidden;
    position: relative;
}

body.dark-mode .scanner-effect-container {
    background-color: var(--background-default-dark);
    border-color: var(--border-color-dark);
}

.scanner-effect-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--background-paper-light) 0%, 
        transparent 15%, 
        transparent 85%, 
        var(--background-paper-light) 100%
    );
    pointer-events: none;
}

body.dark-mode .scanner-effect-container::after {
     background: linear-gradient(to bottom, 
        var(--background-paper-dark) 0%, 
        transparent 15%, 
        transparent 85%, 
        var(--background-paper-dark) 100%
    );
}

.scanner-effect-content {
    animation: scanner-scroll 16s linear infinite;
}

.scanner-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-secondary-light);
}

.scanner-line .material-icons {
    font-size: 1.1rem;
    color: var(--primary-color-light);
}

body.dark-mode .scanner-line {
    color: var(--text-secondary-dark);
}

body.dark-mode .scanner-line .material-icons {
    color: var(--primary-color-dark);
}

@keyframes scanner-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Countdown Bar */
.countdown-bar {
    width: 100%;
    height: 12px;
    background-color: var(--border-color-light);
    border-radius: 6px;
    overflow: hidden;
}

body.dark-mode .countdown-bar {
    background-color: var(--border-color-dark);
}

.countdown-bar-inner {
    height: 100%;
    width: 100%;
    background-image: linear-gradient(to right, var(--primary-color-light), var(--success-color-light));
    border-radius: 6px;
    transition: width 1s linear;
}

body.dark-mode .countdown-bar-inner {
    background-image: linear-gradient(to right, var(--primary-color-dark), var(--success-color-dark));
}
/* --- AI Analysis Splash Screen --- */
.analysis-modal-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 20px;
    align-items: center;
}

/* AI Equalizer Bars */
.ai-bar-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 60px;
    gap: 6px;
}

.ai-bar {
    width: 8px;
    background: var(--primary-color-light);
    border-radius: 4px;
    animation: ai-wave 1.2s infinite ease-in-out;
}

body.dark-mode .ai-bar {
    background: var(--primary-color-dark);
}

.ai-bar:nth-child(1) { animation-delay: 0s; }
.ai-bar:nth-child(2) { animation-delay: 0.1s; }
.ai-bar:nth-child(3) { animation-delay: 0.2s; }
.ai-bar:nth-child(4) { animation-delay: 0.3s; }
.ai-bar:nth-child(5) { animation-delay: 0.4s; }
.ai-bar:nth-child(6) { animation-delay: 0.5s; }
.ai-bar:nth-child(7) { animation-delay: 0.6s; }

@keyframes ai-wave {
    0% { height: 10px; }
    50% { height: 60px; }
    100% { height: 10px; }
}

/* Report Scanner Effect */
.scanner-effect-container {
    height: 80px;
    background-color: var(--background-default-light);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-sm);
    padding: 8px;
    overflow: hidden;
    position: relative;
}

body.dark-mode .scanner-effect-container {
    background-color: var(--background-default-dark);
    border-color: var(--border-color-dark);
}

.scanner-effect-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--background-paper-light) 0%, 
        transparent 15%, 
        transparent 85%, 
        var(--background-paper-light) 100%
    );
    pointer-events: none;
}

body.dark-mode .scanner-effect-container::after {
     background: linear-gradient(to bottom, 
        var(--background-paper-dark) 0%, 
        transparent 15%, 
        transparent 85%, 
        var(--background-paper-dark) 100%
    );
}

.scanner-effect-content {
    animation: scanner-scroll 16s linear infinite;
}

.scanner-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-secondary-light);
}

.scanner-line .material-icons {
    font-size: 1.1rem;
    color: var(--primary-color-light);
}

body.dark-mode .scanner-line {
    color: var(--text-secondary-dark);
}

body.dark-mode .scanner-line .material-icons {
    color: var(--primary-color-dark);
}

@keyframes scanner-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Countdown Bar */
.countdown-bar {
    width: 100%;
    height: 12px;
    background-color: var(--border-color-light);
    border-radius: 6px;
    overflow: hidden;
}

body.dark-mode .countdown-bar {
    background-color: var(--border-color-dark);
}

.countdown-bar-inner {
    height: 100%;
    width: 100%;
    background-image: linear-gradient(to right, var(--primary-color-light), var(--success-color-light));
    border-radius: 6px;
    transition: width 1s linear;
}

body.dark-mode .countdown-bar-inner {
    background-image: linear-gradient(to right, var(--primary-color-dark), var(--success-color-dark));
}
/* --- New 1-to-3 AI Graphic --- */
#ai-graphic-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 140px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    overflow: hidden;
}

.ai-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-primary-light);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

body.dark-mode .ai-doc {
    color: var(--text-primary-dark);
}

.ai-doc.input {
    color: var(--primary-color-light);
}
body.dark-mode .ai-doc.input {
    color: var(--primary-color-dark);
}

.ai-doc .material-icons {
    font-size: 64px;
}

.ai-doc.output {
    font-size: 0.7rem;
    color: var(--text-secondary-light);
    opacity: 0;
    animation: fade-in-doc 0.5s ease-out forwards;
}

body.dark-mode .ai-doc.output {
    color: var(--text-secondary-dark);
}

.ai-doc.output .material-icons {
    font-size: 40px;
    color: var(--success-color-light);
}
body.dark-mode .ai-doc.output .material-icons {
    color: var(--success-color-dark);
}

/* Animation delays for the 3 output docs */
.ai-doc.output:nth-of-type(2) { animation-delay: 1s; }
.ai-doc.output:nth-of-type(3) { animation-delay: 2s; }
.ai-doc.output:nth-of-type(4) { animation-delay: 3s; }

.ai-output-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    align-items: center;
}

.scanner-beam {
    position: absolute;
    left: 20px; /* Start near the input doc */
    top: 10px;
    width: 6px;
    height: 120px;
    background: var(--primary-color-light);
    border-radius: 3px;
    opacity: 0.7;
    box-shadow: 0 0 10px 2px var(--primary-color-light);
    animation: scan-effect 4s linear infinite;
}

body.dark-mode .scanner-beam {
    background: var(--primary-color-dark);
    box-shadow: 0 0 10px 2px var(--primary-color-dark);
}

/* Faint connectors */
.output-connectors {
    position: absolute;
    top: 50%;
    left: 25%;
    width: 50%;
    height: 100px;
    margin-top: -50px;
    z-index: -1;
}
.output-connectors div {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--border-color-light);
    transform-origin: left center;
}
body.dark-mode .output-connectors div {
    background: var(--border-color-dark);
}
.output-connectors .line-1 { top: 0; transform: rotate(-25deg); }
.output-connectors .line-2 { top: 50px; transform: rotate(0deg); }
.output-connectors .line-3 { bottom: 0; transform: rotate(25deg); }
.output-connectors .line-4 { top: 50px; transform: rotate(0deg); }

@keyframes scan-effect {
    0% { transform: translateX(0); opacity: 0; }
    10% { transform: translateX(0); opacity: 0.7; }
    90% { transform: translateX(100px); opacity: 0.7; }
    100% { transform: translateX(100px); opacity: 0; }
}

@keyframes fade-in-doc {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
/* --- AI Analysis Splash Screen --- */
.analysis-modal-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 20px;
    align-items: center;
}

/* --- Movie Splash Screen Styles --- */
.movie-sequence {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary-color-light);
    font-size: 0.9rem;
    width: 90%;
    max-width: 400px;
    text-align: left;
    margin-top: 20px;
    border: 1px solid var(--primary-color-light);
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
    margin-left: auto;
    margin-right: auto;
}

body.dark-mode .movie-sequence {
    color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    box-shadow: 0 0 15px rgba(142, 197, 252, 0.3);
}

.movie-sequence p {
    margin: 8px 0;
    opacity: 0;
    animation: fade-in-up 0.6s ease-out forwards;
    white-space: nowrap;
    overflow: hidden;
}

.movie-sequence .line1 { animation-delay: 0.5s; }
.movie-sequence .line2 { animation-delay: 1.5s; }
.movie-sequence .line3 { animation-delay: 2.5s; }
.movie-sequence .line4 { animation-delay: 3.5s; }
.movie-sequence .line5 { 
    animation-delay: 4.5s; 
    color: var(--primary-color-light); 
    font-weight: bold; 
    text-shadow: 0 0 5px var(--primary-color-light);
}

body.dark-mode .movie-sequence .line5 {
    color: var(--primary-color-dark);
    text-shadow: 0 0 5px var(--primary-color-dark);
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-bar-container {
    width: 90%;
    max-width: 400px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin-top: 25px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.loading-bar-fill {
    width: 0;
    height: 100%;
    background: var(--primary-color-light);
    box-shadow: 0 0 10px var(--primary-color-light);
    border-radius: 4px;
    animation: fill-bar 60s linear forwards;
}

body.dark-mode .loading-bar-fill {
    background: var(--primary-color-dark);
    box-shadow: 0 0 10px var(--primary-color-dark);
}

@keyframes fill-bar {
    from { width: 0%; }
    to { width: 100%; }
}

/* Countdown Bar (Legacy, for the timer text) */
.countdown-bar {
    display: none; /* Hide the old bar, we use loading-bar-container now */
}
