:root {
    /* Dark Mode (Default) */
    --primary: hsl(239, 84%, 67%);
    --secondary: hsl(243, 75%, 58%);
    --background: hsl(215, 39%, 11%);
    --surface: hsl(215, 28%, 17%);
    --on-surface: hsl(210, 14%, 82%);
    --on-surface-secondary: hsl(215, 14%, 65%);
    --success: hsl(159, 82%, 40%);
    --success-subtle: hsla(159, 82%, 40%, 0.1);
    --warning: hsl(45, 93%, 47%);
    --warning-subtle: hsla(45, 93%, 47%, 0.1);
    --error: hsl(0, 84%, 60%);
    --primary-subtle: hsla(239, 84%, 67%, 0.1);
    --border: hsl(215, 19%, 27%);
    --border-focus: var(--primary);
    --focus-ring-color: hsla(239, 84%, 67%, 0.4);
    --error-focus-ring-color: hsla(0, 84%, 60%, 0.4);
    --hover: hsla(0, 0%, 0%, 0.05);
    --shadow-color-base: hsla(0, 0%, 0%, 0.1);
    --shadow-color-layer: hsla(0, 0%, 0%, 0.06);
    --shadow-highlight: hsla(239, 84%, 67%, 0.3);
    --border-radius-lg: 1rem;
    --border-radius-md: 0.75rem;
    --border-radius-sm: 0.5rem;
    --transition-speed: 0.25s;
    --transition-easing: ease-out;
    --transition-bezier-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
        sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.9rem;
    --font-size-lg: 1.1rem;
    --button-padding: 0.8rem 1.5rem;
    --header-height: 5.65rem;
}

body.light-mode {
    /* --- Professionally Designed Light Mode Palette --- */
    --primary: hsl(242, 80%, 60%);
    --secondary: hsl(244, 65%, 52%);
    --background: hsl(220, 25%, 97%);
    --surface: hsl(0, 0%, 100%);
    --on-surface: hsl(216, 28%, 18%);
    --on-surface-secondary: hsl(218, 15%, 45%);
    --success: hsl(150, 60%, 40%);
    --success-subtle: hsla(150, 60%, 40%, 0.1);
    --warning: hsl(45, 93%, 47%);
    --warning-subtle: hsla(45, 93%, 47%, 0.1);
    --error: hsl(0, 75%, 55%);
    --primary-subtle: hsla(242, 80%, 60%, 0.1);
    --border: hsl(220, 20%, 90%);
    --border-focus: var(--primary);
    --focus-ring-color: hsla(242, 80%, 60%, 0.4);
    --shadow-color-base: hsla(220, 30%, 85%, 0.5);
    --shadow-color-layer: hsla(220, 30%, 85%, 0.3);
    --shadow-highlight: hsla(242, 80%, 60%, 0.3);
}

/* Base styles */

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--on-surface);
    font-family: var(--font-family);
    min-height: 100vh;
    transition: background-color var(--transition-speed) var(--transition-easing),
        color var(--transition-speed) var(--transition-easing);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

body.with-header {
    padding-top: var(--header-height);
}

#app {
    flex-grow: 1;
    flex-direction: column;
}

#app.upload-container {
    flex-grow: 1.5;
}

/* --- Page Container Layouts --- */

.pricing-container,
.contact-container {
    width: 90%;
    margin: 2rem auto;
}

.upload-container,
.login-container,
.register-container,
.reset-container {
    width: 90%;
    align-self: center;
    align-content: center;
}

.upload-container {
    max-width: 700px;
}

.login-container {
    max-width: 424px;
}

.register-container,
.reset-container {
    max-width: 555px;
}

.pricing-container,
.contact-container {
    max-width: 1100px;
}

.upload-section,
.modal-content,
.success-section,
.restore-draft-bar {
    position: relative;
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border);
}

.logo-title,
.page-title {
    text-align: center;
    font-weight: 600;
    font-size: 2rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Specific adjustment for the site logo in the header */
.header-logo .logo-title {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.page-title {
    margin-bottom: 1.5rem;
}

.modal-content p {
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--on-surface);
}

/* Upload section hover effects are now handled by utility classes */

/* Drop zone styles */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius-md);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    margin-bottom: 1.5rem;
    background-color: hsla(0, 0%, 0%, 0.02);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: border-color var(--transition-speed) var(--transition-easing),
        background-color var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing),
        padding var(--transition-speed) var(--transition-easing);
}

.drop-zone p {
    position: relative;
    z-index: 1;
    color: var(--on-surface-secondary);
    font-weight: 500;
    margin: 0.5rem 0;
    transition: opacity var(--transition-speed) var(--transition-easing),
        visibility 0s linear var(--transition-speed),
        height var(--transition-speed) var(--transition-easing);
}

.drop-zone>p,
.drop-zone>button:not(.remove-btn) {
    transition: opacity var(--transition-speed) var(--transition-easing),
        visibility 0s linear var(--transition-speed),
        height var(--transition-speed) var(--transition-easing),
        margin var(--transition-speed) var(--transition-easing),
        padding var(--transition-speed) var(--transition-easing);
}

.drop-zone p:first-of-type {
    font-size: var(--font-size-lg);
    color: var(--on-surface);
    margin-bottom: 0.8rem;
}

.drop-zone.has-file {
    border-color: var(--primary);
}

.drop-zone.has-file>p,
.drop-zone.has-file>button:not(.remove-btn) {
    visibility: hidden;
    opacity: 0;
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    transition: opacity var(--transition-speed) var(--transition-easing) 0s,
        visibility 0s linear var(--transition-speed),
        height var(--transition-speed) var(--transition-easing) 0s,
        margin var(--transition-speed) var(--transition-easing) 0s,
        padding var(--transition-speed) var(--transition-easing) 0s;
}

#videoDropZone,
#thumbnailDropZone {
    padding: 2.5rem;
}

#thumbnailDropZone.has-file {
    padding: 0.5rem;
}

.thumbnail-preview {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--border-radius-sm);
    display: none;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-easing);
}

#thumbnailDropZone.has-file .thumbnail-preview {
    display: block;
    opacity: 1;
}

.video-preview {
    width: 100%;
    text-align: center;
    padding: 1rem;
    display: block;
    position: relative;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) var(--transition-easing),
        visibility 0s linear var(--transition-speed);
}

#videoDropZone.has-file .video-preview {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.1s;
}

.video-preview .file-info {
    color: var(--on-surface);
    font-size: var(--font-size-sm);
    word-break: break-all;
}

.drop-zone:hover:not(.has-file) {
    border-color: var(--primary);
    background-color: hsla(242, 80%, 60%, 0.07);
}

.drop-zone.active {
    border-color: var(--primary);
    border-style: solid;
    background-color: hsla(242, 80%, 60%, 0.1);
    box-shadow: 0 0 0 4px var(--focus-ring-color);
    animation: pulseBorder 1.5s infinite var(--transition-easing);
}

.drop-zone.error {
    border-color: var(--error);
    border-style: dashed;
    animation: shake 0.5s var(--transition-bezier-smooth);
}

.error-message {
    color: var(--error);
    font-size: var(--font-size-sm);
    margin-top: 0.5rem;
    font-weight: 500;
    display: block;
    position: relative;
    z-index: 1;
    height: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) var(--transition-easing),
        visibility 0s linear var(--transition-speed);
}

.drop-zone.error .error-message {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.1s;
}

/* --- Utility Classes --- */

/* Common focus-visible pattern used across multiple elements */
.focus-ring:focus-visible,
.btn:focus-visible,
.remove-btn:focus-visible,
.close-btn:focus-visible,
.back-button:focus-visible,
.profile-icon-btn:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px var(--focus-ring-color);
}

/* Common transition patterns */
.transition-standard {
    transition: background-color var(--transition-speed) var(--transition-easing),
        border-color var(--transition-speed) var(--transition-easing),
        transform var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
}

.transition-all {
    transition: all var(--transition-speed) var(--transition-easing);
}

.transition-opacity {
    transition: opacity var(--transition-speed) var(--transition-easing),
        visibility 0s linear var(--transition-speed);
}

/* Common hover effects */
.hover-lift-sm:hover {
    transform: translateY(-2px);
}

.hover-lift-md:hover {
    transform: translateY(-4px);
}

.hover-lift-lg:hover {
    transform: translateY(-5px);
}

.hover-shadow-md:hover {
    box-shadow: 0 10px 15px -3px var(--shadow-color-base),
        0 4px 6px -4px var(--shadow-color-layer);
}

.hover-shadow-lg:hover {
    box-shadow: 0 20px 25px -5px var(--shadow-color-base),
        0 8px 10px -6px var(--shadow-color-layer);
}

/* Common box-shadow patterns */
.shadow-sm {
    box-shadow: 0 4px 6px -1px var(--shadow-color-base),
        0 2px 4px -2px var(--shadow-color-layer);
}

.shadow-md {
    box-shadow: 0 10px 15px -3px var(--shadow-color-base),
        0 4px 6px -4px var(--shadow-color-layer);
}

.shadow-lg {
    box-shadow: 0 20px 25px -5px var(--shadow-color-base),
        0 8px 10px -6px var(--shadow-color-layer);
}

/* Common border-radius utilities */
.rounded-sm {
    border-radius: var(--border-radius-sm);
}

.rounded-md {
    border-radius: var(--border-radius-md);
}

.rounded-lg {
    border-radius: var(--border-radius-lg);
}

/* Button margin reset utility */
.btn-no-margin {
    margin-top: 0;
}

/* --- Refactored Button System --- */

/* Base .btn class for all buttons and button-like links */
.btn {
    /* Structure & Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow: hidden;

    /* Sizing & Spacing */
    padding: var(--button-padding);
    margin-top: 1rem;
    gap: 0.5rem;

    /* Typography */
    font-weight: 500;
    font-size: 0.95rem;
    color: hsl(0, 0%, 100%);
    text-decoration: none;

    /* Appearance */
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    -webkit-tap-highlight-color: transparent;

    /* Transitions */
    transition: background-color var(--transition-speed) var(--transition-easing),
        border-color var(--transition-speed) var(--transition-easing),
        transform var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
}

/* Primary Button Style */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: hsl(0, 0%, 100%);
    /* EXPLICITLY set text color here */
    box-shadow: 0 2px 4px hsla(0, 0%, 0%, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-highlight);
}

/* Focus styles handled by .focus-ring utility class above */

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px) scale(0.97);
    box-shadow: 0 2px 5px var(--shadow-highlight);
    background: var(--secondary);
}

/* States applicable to all buttons */
.btn:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.remove-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: hsla(240, 20%, 15%, 0.8);
    color: hsl(0, 0%, 100%);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition: background-color var(--transition-speed) var(--transition-easing),
        transform var(--transition-speed) var(--transition-easing);
    padding: 0;
    margin: 0;
}

body.light-mode .remove-btn {
    background: hsla(0, 0%, 95%, 0.8);
    color: var(--on-surface);
}

.drop-zone.has-file .remove-btn {
    display: flex;
}

.remove-btn:hover {
    background: var(--error);
    color: hsl(0, 0%, 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: none;
}

body.light-mode .remove-btn:hover {
    background: var(--error);
    color: hsl(0, 0%, 100%);
}

.remove-btn:active {
    transform: scale(1) rotate(90deg);
    background-color: hsl(5, 65%, 46%);
}

/* Focus styles handled by .focus-ring utility class above */

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: hsla(215, 41%, 15%, 0.8);
    /* Use background color with opacity */
    backdrop-filter: blur(6px);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s var(--transition-easing);
}

.modal.open {
    display: flex;
}

.modal-content {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    animation: modalContentSlide 0.35s var(--transition-bezier-smooth) forwards;
    width: 100%;
    max-width: 600px;
    margin: auto;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: 1.5rem;
}

/* Closing animation for modal */
.modal.is-closing {
    animation: modalFadeOut 0.3s var(--transition-easing) forwards;
}

.modal.is-closing .modal-content {
    animation: modalContentSlideOut 0.35s var(--transition-bezier-smooth) forwards;
}

#videoPreviewModal .modal-content {
    max-width: 750px;
}

#platformModal .modal-content {
    max-width: 700px;
}

.modal h2 {
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--on-surface);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--on-surface-secondary);
    z-index: 10;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close-btn:hover {
    color: hsl(0, 0%, 100%);
    background-color: var(--error);
    transform: rotate(90deg) scale(1.1);
}

/* Focus styles handled by .focus-ring utility class above */

#videoPreviewContainer {
    width: 100%;
    background: hsl(0, 0%, 0%);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

#videoPreviewContainer video {
    display: block;
    width: 100%;
    max-height: 60vh;
    border-radius: var(--border-radius-md);
}

#removePreviewVideoBtn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: hsla(0, 0%, 0%, 0.6);
    border-color: hsla(0, 0%, 100%, 0.4);
}

.modal-actions {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
    background: var(--surface);
    color: var(--on-surface);
    transition: border-color var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
    box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.1);
}

body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode input[type="password"],
body.light-mode input[type="date"],
body.light-mode input[type="time"],
body.light-mode textarea,
body.light-mode select {
    background: var(--background);
    color-scheme: light;
}

.form-group-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    align-items: start;
}

/* Optional: To ensure margins are perfect within the grid */
.form-group-grid .form-group {
    margin-bottom: 0;
}

/* Timezone info display */
.timezone-info {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-subtle);
}

.timezone-display {
    margin: 0;
    font-size: 0.9rem;
    color: var(--on-surface-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timezone-icon {
    font-size: 1rem;
}

#currentTimezone {
    font-weight: 500;
    color: var(--on-surface);
}

.delete {
    color:var(--error)
}




.form-label-hint {
    font-size: 0.8rem;
    font-weight: 400;
    /* Lighter than the main label */
    color: var(--on-surface-secondary);
    margin-left: 0.75rem;

    /* Animation properties */
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* When the input it's related to has focus, make the hint visible */
input:focus+.form-label-hint,
input:focus~.form-label-hint,
/* General sibling combinator for flexibility */
.form-group:focus-within .form-label-hint {
    /* Most robust solution */
    opacity: 1;
}

/* Label with inline hint container */
.label-with-hint {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
}

/* Reset label styling inside label-with-hint container */
.label-with-hint label {
    margin-bottom: 0;
    display: inline-block;
    vertical-align: baseline;
}

/* Inline hint specific styling for labels */
.form-label-hint.label-inline-hint {
    display: inline-block;
    margin-left: 0.75rem;
    margin-bottom: 0;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    vertical-align: baseline;
}

/* Focus behavior for label inline hints */
.form-group:focus-within .form-label-hint.label-inline-hint {
    opacity: 1;
}

/* Inline hint (similar to inline-error but for informational text) */
.inline-hint {
    color: var(--on-surface-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 0.5rem;
    margin-bottom: 0.6rem;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.inline-hint.visible {
    opacity: 1;
    transition: opacity 0.25s ease-in;
}

/* Label with inline hint container */
.label-with-hint {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
}

/* Reset label styling inside label-with-hint container */
.label-with-hint label {
    margin-bottom: 0;
    display: inline-block;
    vertical-align: baseline;
}

/* --- Browser Autofill Style Override --- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--on-surface) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
    /* Force the background color */
    transition: background-color 5000s ease-in-out 0s;
    font-family: var(--font-family);
    /* Ensure font consistency */
    font-size: var(--font-size-base);
    /* Ensure font size consistency */
    caret-color: var(--on-surface) !important;
    /* Ensure cursor visibility */
}

body.light-mode input:-webkit-autofill,
body.light-mode input:-webkit-autofill:hover,
body.light-mode input:-webkit-autofill:focus,
body.light-mode input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--background) inset !important;
    caret-color: var(--on-surface) !important;
}

/* Country search input specific autofill styling */
#profileCountrySearch:-webkit-autofill,
#profileCountrySearch:-webkit-autofill:hover,
#profileCountrySearch:-webkit-autofill:focus,
#profileCountrySearch:-webkit-autofill:active {
    -webkit-text-fill-color: var(--on-surface) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    caret-color: var(--on-surface) !important;
}

/* Firefox autofill styling */
#profileCountrySearch:-moz-autofill {
    background-color: var(--surface) !important;
    color: var(--on-surface) !important;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
}

/* Cross-browser dropdown compatibility */
.country-dropdown {
    /* Ensure consistent scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--surface);
}

.country-dropdown::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: var(--surface);
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.country-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--on-surface-secondary);
}

input::placeholder,
textarea::placeholder {
    color: var(--on-surface-secondary);
    opacity: 0.6;
    font-size: var(--font-size-sm);
}

input[type="datetime-local"] {
    min-height: calc(1.6em + 1.6rem + 2px);
    color-scheme: dark;
    /* Default to dark scheme for consistency */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

/* --- DATETIME PICKER GRID STYLES --- */

.datetime-picker-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Give more space to the date input */
    gap: 1rem;
}

/* Ensure the separate date/time inputs have consistent heights */
input[type="date"],
input[type="time"] {
    min-height: calc(1.6em + 1.6rem + 2px);
}

/* Apply the color-scheme hint for better theme matching */
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

body.light-mode input[type="date"],
body.light-mode input[type="time"] {
    color-scheme: light;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid hsla(0, 0%, 100%, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.input-spinner {
    position: absolute;
    right: 3rem;
    /* Position it to the left of the password toggle */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

button.is-loading .loading-spinner {
    display: inline-block;
}

button.is-loading .button-text {
    opacity: 0.7;
    margin-left: -0.5rem;
}

/* Platform selection styles */
.platform-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.platform-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    background-color: hsla(0, 0%, 100%, 0.03);
    cursor: pointer;
    text-align: center;
    margin-top: 0;
    gap: 1rem;
}

.platform-button:hover {
    border-color: var(--primary);
    background: hsla(0, 0%, 100%, 0.05);
    transform: translateY(-3px);
}

body.light-mode .platform-button:hover {
    border-color: var(--primary);
    background: var(--hover);
}

.platform-button.selected {
    border-color: var(--success);
    background-color: hsla(150, 60%, 40%, 0.15);
    box-shadow: 0 0 0 2px var(--success);
}

.platform-button:focus-visible {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--focus-ring-color);
}

.platform-button img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
}

.platform-button span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--on-surface);
}

.platform-button.selected span {
    color: var(--success);
    font-weight: 600;
}

/* Progress bar styles */
.progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: var(--border);
    border-radius: 6px;
    margin-top: 1.5rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.progress-bar-container[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--success), hsl(159, 82%, 54%));
    border-radius: 6px;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

body.light-mode .progress-bar {
    background: linear-gradient(90deg, var(--success), hsl(150, 60%, 55%));
}

/* Success screen styles */
.success-section {
    padding: 3rem 2.5rem;
    text-align: center;
    animation: fadeIn 0.5s var(--transition-easing);
}

.success-section h2 {
    color: var(--success);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.success-section p {
    color: var(--on-surface-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
}

/* --- BUTTON REFINEMENTS --- */

/* Destructive Button Style */
.btn-destructive {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--error);
}

.btn-destructive:hover:not(:disabled) {
    background: var(--error);
    border-color: var(--error);
    color: hsl(0, 0%, 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px hsla(0, 75%, 55%, 0.3);
}

body.light-mode .btn-destructive:hover:not(:disabled) {
    background: var(--error);
    border-color: var(--error);
    color: hsl(0, 0%, 100%);
}

/* Inline Form Validation Errors */
.inline-error {
    color: var(--error);
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.inline-error.visible {
    opacity: 1;
}

input.invalid,
textarea.invalid,
select.invalid {
    border-color: var(--error);
}

input.invalid:focus,
textarea.invalid:focus,
select.invalid:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-focus-ring-color);
}

/* --- LOGIN PAGE STYLES --- */

.separator {
    text-align: center;
    color: var(--on-surface-secondary);
    margin: 1.5rem 0;
    position: relative;
    font-weight: 500;
}

.separator::before,
.separator::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: var(--border);
}

.separator::before {
    left: 0;
}

.separator::after {
    right: 0;
}

/* Secondary Button Style */
.btn-secondary {
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--on-surface);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--background);
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--shadow-color-base);
    transform: translateY(-2px);
}

.button-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.form-footer-link {
    font-size: 0.8rem;
    color: var(--on-surface-secondary);
}

.form-footer-link.forgot {
    text-align: left;
}

.form-footer-link.register {
    text-align: center;
}

.form-footer-link a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.form-footer-link a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* --- REGISTER PAGE REFINEMENTS --- */

.back-button {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: none;
    border: none;
    color: var(--on-surface-secondary);
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 600;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 6px;
    transition: all 0.2s var(--transition-easing);
}

.back-button:hover {
    background-color: var(--primary);
    color: hsl(0, 0%, 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 10px var(--shadow-highlight);
}

.back-button:active {
    background-color: var(--primary);
    padding-bottom: 6px;
    transform: scale(0.95);
}

/* Focus styles handled by .focus-ring utility class above */

/* --- CONTACT PAGE STYLES --- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    opacity: 0;
    /* For fade-in animation */
    animation: fadeIn 0.6s var(--transition-easing) 0.1s forwards;
}

.contact-info {
    padding-right: 2rem;
}

.contact-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: font-size 0.3s var(--transition-easing);
}

.contact-description {
    font-size: var(--font-size-lg);
    color: var(--on-surface-secondary);
    line-height: 1.7;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.select-wrapper {
    position: relative;
}



select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Simple arrow indicator for select elements */
.select-wrapper::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--on-surface-secondary);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.select-wrapper:hover::after {
    color: var(--primary);
}

/* Additional browser-specific fixes for dropdown hover behavior */
select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: var(--surface);
}

select::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

select::-webkit-scrollbar-thumb:hover {
    background: var(--on-surface-secondary);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-subtle);
}

select option {
    background: var(--surface) !important;
    color: var(--on-surface) !important;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    border: none !important;
    /* Disable browser default hover behavior */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Force consistent hover behavior across all browsers */
select option:hover,
select option:focus {
    background: hsla(0, 0%, 100%, 0.05) !important;
    color: var(--on-surface) !important;
    outline: none !important;
}

body.light-mode select option:hover,
body.light-mode select option:focus {
    background: var(--hover) !important;
    color: var(--on-surface) !important;
}

select option:checked,
select option:selected {
    background: hsla(0, 0%, 100%, 0.1) !important;
    font-weight: 500;
    color: var(--on-surface) !important;
}

body.light-mode select option:checked,
body.light-mode select option:selected {
    background: hsla(0, 0%, 0%, 0.1) !important;
    color: var(--on-surface) !important;
}

/* Fix for stuck hover states - reset all options first */
select option:not(:hover):not(:focus):not(:checked):not(:selected) {
    background: var(--surface) !important;
    color: var(--on-surface) !important;
}

body.light-mode select option:not(:hover):not(:focus):not(:checked):not(:selected) {
    background: var(--surface) !important;
    color: var(--on-surface) !important;
}

/* Ensure proper hover behavior on all dropdown types */
select[id*="format"] option:hover,
select[id*="Format"] option:hover,
select[id*="day"] option:hover,
select[id*="Day"] option:hover,
#profileDateFormat option:hover,
#profileTimeFormat option:hover,
#profileFirstDay option:hover,
#contactReason option:hover {
    background: hsla(0, 0%, 100%, 0.05) !important;
    color: var(--on-surface) !important;
}

body.light-mode select[id*="format"] option:hover,
body.light-mode select[id*="Format"] option:hover,
body.light-mode select[id*="day"] option:hover,
body.light-mode select[id*="Day"] option:hover,
body.light-mode #profileDateFormat option:hover,
body.light-mode #profileTimeFormat option:hover,
body.light-mode #profileFirstDay option:hover,
body.light-mode #contactReason option:hover {
    background: var(--hover) !important;
    color: var(--on-surface) !important;
}

/* Force reset hover states for specific problematic dropdowns */
#profileDateFormat option:not(:hover):not(:checked),
#profileTimeFormat option:not(:hover):not(:checked),
#profileFirstDay option:not(:hover):not(:checked),
#contactReason option:not(:hover):not(:checked) {
    background: var(--surface) !important;
    color: var(--on-surface) !important;
}

/* Additional browser-specific overrides for dropdown hover issues */
select option:active {
    background: hsla(0, 0%, 100%, 0.1) !important;
}

body.light-mode select option:active {
    background: hsla(0, 0%, 0%, 0.1) !important;
}

/* Webkit-specific fixes for dropdown hover behavior */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select option {
        background-color: var(--surface) !important;
    }

    select option:hover {
        background-color: hsla(0, 0%, 100%, 0.05) !important;
        background-image: none !important;
    }

    body.light-mode select option:hover {
        background-color: var(--hover) !important;
        background-image: none !important;
    }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    select option:hover {
        background-color: hsla(0, 0%, 100%, 0.05) !important;
    }

    body.light-mode select option:hover {
        background-color: var(--hover) !important;
    }
}

select:invalid {
    color: var(--on-surface-secondary);
}

.word-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--on-surface-secondary);
    margin-top: 0.5rem;
    transition: color 0.2s ease-in-out;
}

.word-counter.error {
    color: var(--error);
    font-weight: 500;
}

.password-hint {
    font-size: 0.8rem;
    color: var(--on-surface-secondary);
    padding-left: 0.2rem;
    /* Animation properties */
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
    transition: all 0.3s var(--transition-easing);
}

.password-hint.visible {
    max-height: 50px;
    /* A value larger than the expected height */
    opacity: 1;
    margin-top: 0.5rem;
}

/* --- LOGIN PAGE REFINEMENTS --- */

.login-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--on-surface-secondary);
}

.page-main-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
    /* Space from logo */
    margin-bottom: 0.75rem;
}

.login-actions {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.w-full {
    width: 100%;
}

.login-status {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    color: var(--on-surface-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    margin: 0;
    cursor: pointer;
    color: var(--on-surface-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.password-toggle:hover {
    color: var(--on-surface);
    background-color: var(--border);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* Ensure password inputs with a toggle icon have space for it */
.input-wrapper input {
    padding-right: 2.5rem;
}

/* Hide the browser's default password reveal icon (for Edge, IE) */
input[type="password"]::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

/* --- FORGOT PASSWORD MODAL STYLES --- */
.text-center {
    text-align: center;
}

.modal-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.modal-title-highlight {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 1rem;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: var(--on-surface);
    margin-bottom: 0.5rem;
}

.modal-prompt {
    color: var(--on-surface-secondary);
    margin-bottom: 2rem;
}

/* Adjustments for forgot password form */
#forgotPasswordForm .form-group {
    text-align: left;
    /* Align label/input left */
    margin-bottom: 1rem;
}

#emailSentModal .modal-subtitle strong {
    color: var(--on-surface);
    font-weight: 600;
}

/* --- Referral Section Styles --- */

.referral-apply-card,
.referral-share-card,
.referral-stats-card {
    margin-bottom: 1.5rem;
}

.referral-description {
    color: var(--on-surface-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-size: var(--font-size-base);
}

.referral-input-group,
.referral-link-group {
    margin-bottom: 1rem;
}

.referral-code-input,
.referral-link-input {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.referral-status {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    display: none;
}

.referral-status.success {
    background-color: hsla(159, 82%, 40%, 0.1);
    color: var(--success);
    border: 1px solid hsla(159, 82%, 40%, 0.3);
    display: block;
}

.referral-status.error {
    background-color: hsla(0, 84%, 60%, 0.1);
    color: var(--error);
    border: 1px solid hsla(0, 84%, 60%, 0.3);
    display: block;
}

body.light-mode .referral-status.success {
    background-color: hsla(150, 60%, 40%, 0.1);
    color: hsl(150, 60%, 35%);
    border: 1px solid hsla(150, 60%, 40%, 0.3);
}

body.light-mode .referral-status.error {
    background-color: hsla(0, 75%, 55%, 0.1);
    color: hsl(0, 75%, 45%);
    border: 1px solid hsla(0, 75%, 55%, 0.3);
}

.referral-benefits {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: hsla(0, 0%, 100%, 0.02);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
}

body.light-mode .referral-benefits {
    background-color: hsla(220, 25%, 95%, 0.5);
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.benefit-text {
    color: var(--on-surface-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

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

.stat-item {
    text-align: center;
    padding: 1.25rem 1rem;
    background-color: hsla(0, 0%, 100%, 0.02);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
    transition: transform var(--transition-speed) var(--transition-easing);
}

.stat-item:hover {
    transform: translateY(-2px);
}

body.light-mode .stat-item {
    background-color: hsla(220, 25%, 95%, 0.5);
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
    font-weight: 500;
}

.applied-referral {
    padding: 1rem 1.25rem;
    background-color: hsla(242, 80%, 60%, 0.08);
    border: 1px solid hsla(242, 80%, 60%, 0.2);
    border-radius: var(--border-radius-sm);
}

body.light-mode .applied-referral {
    background-color: hsla(242, 80%, 60%, 0.05);
    border: 1px solid hsla(242, 80%, 60%, 0.15);
}

.applied-text {
    margin: 0;
    color: var(--on-surface);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.applied-text strong {
    color: var(--primary);
    font-weight: 600;
}

/* Button Loading and Success States */
.btn .btn-spinner {
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
}

.btn.loading .btn-text {
    opacity: 0.7;
}

.btn.loading .btn-spinner {
    display: inline-block;
}

.btn.success-state {
    background: var(--success);
    border-color: var(--success);
    transform: translateY(-1px);
}

.btn.error-state {
    background: var(--error);
    border-color: var(--error);
    transform: translateY(-1px);
}

/* Input States for Referral */
input[type="text"]:disabled {
    background-color: var(--border);
    color: var(--on-surface-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

body.light-mode input[type="text"]:disabled {
    background-color: hsla(220, 20%, 90%, 0.5);
}

/* Responsive Design for Referral Section */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .benefit-item {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem 0;
    }

    .benefit-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .referral-benefits {
        padding: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .input-with-button {
        flex-direction: column;
        gap: 0.75rem;
    }

    .input-with-button input {
        margin-bottom: 0;
    }

    .input-with-button .btn {
        margin-top: 0;
        width: 100%;
    }
}

/* --- Header Styles --- */

.header-right-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* .header-actions .btn margin-top consolidated above */

.main-header,
.user-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid transparent;
    /* Default to a transparent border */
    align-items: center;
    z-index: 100;
    transition: background-color var(--transition-speed) var(--transition-easing),
        border-bottom-color var(--transition-speed) var(--transition-easing);
}

.main-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}

.user-header {
    background-color: var(--background);
    padding: 1.5rem 2.5rem 1.5rem 2.5rem;
}

.main-header,
body.has-bordered-header .user-header {
    border-bottom-color: var(--border);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}

.header-nav {
    display: flex;
    font-size: 1.1rem;
    gap: 1.5rem;
}

.header-nav a {
    text-decoration: none;
    color: var(--on-surface-secondary);
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.header-nav a.active-link {
    font-weight: 600;
    color: var(--primary);
}

.header-nav a:hover {
    color: var(--primary);
}

body.light-mode .header-nav a:hover {
    color: var(--primary);
}

body.light-mode .header-nav a.active-link {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-shrink: 0;
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    background-color: var(--border);
    color: var(--on-surface-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
        border-color 0.2s ease-in-out;
}

.theme-toggle-btn:hover {
    border: 1px solid var(--focus-ring-color);
    background-color: var(--surface);
    color: var(--primary);
    transform: scale(1.05);
}

.theme-toggle-btn:active {
    background-color: var(--background);
    transform: scale(0.95);
}

.page-fade-in {
    animation: fadeIn 0.5s var(--transition-easing);
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface);
    color: var(--on-surface);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.3);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}


/* --- Animation keyframes --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: none
    }

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 var(--focus-ring-color);
    }

    70% {
        box-shadow: 0 0 0 8px hsla(242, 80%, 60%, 0);
    }

    100% {
        box-shadow: 0 0 0 0 hsla(242, 80%, 60%, 0);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    10%,
    90% {
        transform: translateX(-4px);
    }

    30%,
    70% {
        transform: translateX(4px);
    }

    50% {
        transform: translateX(-2px);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes modalContentSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateY(20px) scale(0.97);
        opacity: 0;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalContentSlide {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: translateY(-50%) rotate(0deg);
    }

    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* --- PRICING PAGE STYLES --- */

.pricing-header {
    text-align: center;
    margin-bottom: 4rem;
}

.pricing-subtitle {
    max-width: 555px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--on-surface-secondary);
}

.pricing-subtitle.above-toggle {
    margin-top: 3rem;
}

.logo-title.pricing {
    font-size: 3rem;
    font-weight: 700;
    /* Use standard bold weight */
}

.pricing-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    font-weight: 500;
    color: var(--on-surface-secondary);
}

.toggle-label {
    transition: color var(--transition-speed) var(--transition-easing),
        font-weight var(--transition-speed) var(--transition-easing);
    cursor: pointer;
    user-select: none;
    /* Prevents text selection on click */
}

.toggle-label.active {
    color: var(--primary);
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    border: 1px solid var(--border);
    transition: 0.4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: hsl(0, 0%, 100%);
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

body.dark-mode .slider {
    background-color: var(--surface);
}

body.dark-mode .slider:before {
    background-color: var(--on-surface-secondary);
}

body.dark-mode input:checked+.slider:before {
    background-color: hsl(0, 0%, 100%);
}

.save-badge {
    background-color: hsla(150, 60%, 40%, 0.15);
    color: var(--success);
    padding: 0.25rem 0.6rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: opacity 0.3s var(--transition-easing);
}

.free-tier-banner {
    margin-top: 3rem;
    /* Adds consistent spacing above the banner */
}

.free-tier-banner .pricing-tier {
    max-width: 383px;
    /* Constrains width for a cleaner look on large screens */
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--primary);
    /* Permanent purple border */
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
    /* Make cards same height */
    justify-items: center;
    /* Center cards horizontally */
}

.pricing-tier {
    max-width: 383px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
    padding: 2rem;
}

/* Apply hover effect only to tiers inside the main grid, excluding the free tier */
.pricing-grid .pricing-tier:not(.recommended):hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

/* Push button to the bottom of the card */
.pricing-tier .modal-actions {
    margin-top: auto;
}

.tier-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tier-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tier-description {
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
    min-height: 40px;
    /* Reserve space to prevent layout shifts */
}

.tier-price {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--on-surface);
    transition: transform var(--transition-speed) var(--transition-easing),
        border-color var(--transition-speed) var(--transition-easing);
}

.price-amount.custom-price {
    font-size: 2.5rem;
    /* Make "Custom" text slightly smaller */
}

.price-period {
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
    margin-left: 0.25rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    flex-grow: 1;
    /* Allows the button to be pushed to the bottom */
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
}

.feature-tick {
    color: var(--success);
    font-weight: 700;
    font-size: 1.2rem;
}

.pricing-tier.recommended {
    border-color: var(--primary);
    transform: translateY(-10px);
    /* Lift the recommended card */
    box-shadow: 0 0 0 2px var(--primary);
    position: relative;
    overflow: hidden;
}

.pricing-tier.recommended:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 25px -5px var(--shadow-color-base),
        0 8px 10px -6px var(--shadow-color-layer), 0 0 0 2px var(--primary),
        0 0 40px 0 var(--shadow-highlight);
}

.tier-badge {
    position: absolute;
    top: 1.5rem;
    right: -45px;
    background: var(--primary);
    color: hsl(0, 0%, 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 2rem 0.5rem 3rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px hsla(0, 0%, 0%, 0.2);
}

.faq-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color var(--transition-speed) var(--transition-easing);
    cursor: pointer;
    overflow: hidden;
    /* Important for the accordion effect */
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
}

.faq-toggle-icon {
    width: 1em;
    height: 1em;
    border-style: solid;
    border-width: 0.15em 0.15em 0 0;
    border-color: var(--on-surface-secondary);
    display: inline-block;
    transform: rotate(135deg);
    transition: transform var(--transition-speed) var(--transition-bezier-smooth);
}

.faq-item.open .faq-toggle-icon {
    transform: rotate(-45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--transition-easing),
        padding-top 0.3s var(--transition-easing);
}

.faq-answer p {
    color: var(--on-surface-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    /* Adjust if answers are longer */
    padding-top: 1rem;
}


/* --- DASHBOARD STYLES --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.placeholder-text {
    color: var(--on-surface-secondary);
    margin-top: 1rem;
    font-size: var(--font-size-sm);
}

.hero-visual {
    width: 100%;
    max-width: 800px;
    margin-top: 4rem;
    border-radius: var(--border-radius-lg);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--on-surface-secondary);
    max-width: 600px;
    margin: -1rem auto 3rem;
    line-height: 1.7;
}

.features-section,
.why-us-section,
.final-cta-section {
    padding: 5rem 0;
    text-align: center;
}

.features-grid,
.value-prop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 3rem auto 0;
    text-align: left;
}

.feature-card,
.value-prop-card {
    background-color: var(--surface);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border);
    transition: transform var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
}

.feature-card:hover,
.value-prop-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    background: var(--primary);
    padding: 8px;
    border-radius: var(--border-radius-sm);
    color: white;
    /* For SVGs that use currentColor */
}

.feature-card h3,
.value-prop-card h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--on-surface);
}

.feature-card p,
.value-prop-card p {
    color: var(--on-surface-secondary);
    line-height: 1.6;
}

.why-us-section {
    background-color: var(--surface);
    padding: 5rem 2rem;
    margin: 4rem 0;
    border-radius: var(--border-radius-lg);
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--transition-easing),
        transform 0.6s var(--transition-easing);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- HOME PAGE STYLES --- */
.home-container {
    width: 90%;
    max-width: 1250px;
    padding: 0 2rem;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    padding: 6rem 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--on-surface-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* A larger button variant for primary CTAs */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.trusted-by-section {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 4rem;
}

.trusted-by-section p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-surface-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    filter: grayscale(1) brightness(1.5);
}

body.light-mode .logos-container {
    filter: grayscale(1) opacity(0.6);
}

.logos-container img {
    height: 32px;
    max-width: 150px;
    object-fit: contain;
}

.final-cta-section .section-title {
    font-size: 2.5rem;
}

.final-cta-section p {
    color: var(--on-surface-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* --- FOOTER STYLES --- */
.main-footer-container {
    background-color: var(--surface);
    color: var(--on-surface-secondary);
    padding: 4rem 2rem 2rem;
    margin-top: 15px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    color: var(--on-surface);
    margin-bottom: 1.5rem;
}

.footer-section.about .logo-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.footer-section p {
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul a {
    color: var(--on-surface-secondary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-section ul a:hover {
    color: var(--primary);
}

.footer-section.subscribe form {
    display: flex;
    flex-direction: column;
}

.footer-section.subscribe input {
    margin-bottom: 1rem;
}

/* .footer-section.subscribe button margin-top consolidated above */

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: var(--font-size-sm);
}

/* --- SCHEDULER PAGE - TOP LEFT LOGO --- */

.scheduler-logo-container {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.page-context-btn {
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--on-surface-secondary);
    font-size: 1.3rem;
    font-weight: 549;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    cursor: default;
    /* Make it look non-interactive */
    transition: background-color var(--transition-speed) var(--transition-easing),
        color var(--transition-speed) var(--transition-easing);
    /* ADD a transition */
}

.scheduler-logo-container .logo-title {
    font-size: 1.8rem;
    /* A bit smaller to feel less intrusive than a main header logo */
    margin: 0;
}

/* --- PROFILE DROPDOWN MENU STYLES --- */
.profile-menu-container {
    position: relative;
    /* Changed for dropdown positioning */
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--primary);
    color: hsl(0, 0%, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s var(--transition-easing),
        box-shadow 0.2s var(--transition-easing);
}

.profile-icon-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px var(--shadow-highlight);
}

/* Focus styles handled by .focus-ring utility class above */

.profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profile-initials {
    font-weight: 600;
    font-size: 1rem;
    color: hsl(0, 0%, 100%);
    display: flex;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    /* Position below the icon */
    right: 0;
    width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 20px -5px var(--shadow-color-base);
    padding: 0.5rem 0;

    /* Animation properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s 0.2s;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s 0s;
}

.profile-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-dropdown a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--on-surface-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.profile-dropdown a:hover,
.profile-dropdown a:focus {
    background: hsla(0, 0%, 100%, 0.05);
    color: var(--on-surface);
    outline: none;
}

body.light-mode .profile-dropdown a:hover,
body.light-mode .profile-dropdown a:focus {
    background: var(--hover);
    color: var(--on-surface);
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

.main-header .profile-menu-container {
    display: none;
    /* Hide profile menu by default on main header */
}

/* Add a class to show it when the user is logged in */
.main-header .profile-menu-container.visible {
    display: flex;
    /* Use flex to align items correctly */
    align-items: center;
    gap: 1.5rem;
}

/* --- USER PROFILE PAGE --- */

.profile-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: flex-start;
    padding: 1rem 0;
}

.profile-content {
    width: 90%;
    max-width: 818px;
    justify-self: center;
    margin-top: 0.4rem;
}

/* --- Profile Sidebar --- */
.profile-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 1.25rem);
    /* Reduced offset to match main content visual spacing */
}

.profile-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 1.25rem;
}



/* --- Profile Content --- */
.profile-section {
    display: none;
    /* Hide all sections by default */
}

.profile-section.active {
    display: block;
    /* Show only the active section */
    animation: fadeIn 0.4s var(--transition-easing);
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    margin: 0 0 1.5rem 0;
    position: relative;
    transition: transform var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing),
        border-color var(--transition-speed) var(--transition-easing);
}

.content-card:hover {
    box-shadow: 0 4px 20px var(--shadow-color-base);
    transform: translateY(-2.5px);
}

/* Special hover effect for platform containers - ALL containers hover up except warning state */
.content-card.platform-container:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 25px var(--shadow-color-base);
    transform: translateY(-4px);
}

/* No hover effects for containers with warning state (reauthenticate) */
.content-card.platform-container.container-warning:hover {
    border-color: var(--border);
    transform: none;
}

.content-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Profile-specific form styles */
.profile-picture-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}

.profile-avatar .profile-picture {
    border-radius: 50%;
}

.profile-picture-actions .btn,
.header-actions .btn,
.footer-section.subscribe button,
.two-factor-item .btn,
.danger-zone-item .btn,
.recovery-code-item .btn {
    margin-top: 0;
}

.profile-picture-actions .form-label-hint {
    opacity: 1;
    margin-top: 0.5rem;
    margin-left: 0;
}

.input-with-button {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0;
    transition: gap var(--transition-speed) var(--transition-easing);
}

.input-with-button.visible {
    gap: 1rem;
}

.input-with-button .btn {
    margin-top: 0;
    white-space: nowrap;
    /* Prevent text from wrapping during animation */

    /* Initially hidden: no width, no padding, hidden overflow */
    max-width: 0;
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    overflow: hidden;
}

/* State when the button should be visible */
.input-with-button.visible .btn {
    max-width: 200px;
    /* Animate to a max-width */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    opacity: 1;
}

/* Two-Factor and Danger Zone Sections */
.two-factor-item,
.danger-zone-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.two-factor-item:not(:last-child),
.danger-zone-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.two-factor-description h3,
.danger-zone-description h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.two-factor-description p,
.danger-zone-description p {
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
}

/* .two-factor-item .btn, .danger-zone-item .btn margin-top consolidated above */

.two-factor-item .connect-btn {
    border-color: var(--success);
    color: var(--success);
}

.two-factor-item .connect-btn:hover {
    background-color: var(--success);
    color: hsl(0, 0%, 100%);
}

.two-factor-item .disconnect-btn {
    border-color: var(--error);
    color: var(--error);
}

.two-factor-item .disconnect-btn:hover {
    background-color: var(--error);
    color: hsl(0, 0%, 100%);
}

.content-card.danger-zone {
    border-color: var(--error);
}

/* Specific styling for danger zone card header */
.content-card.danger-zone .card-header {
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.content-card.danger-zone .card-header .btn {
    margin-top: 1.9rem;
    align-self: flex-start;
}

.content-card.danger-zone .card-header-text .content-card-description {
    margin-bottom: 0;
}

.form-group {
    position: relative;
    /* Needed for absolute positioning of the feedback element */
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
}

.saved-feedback {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-size: var(--font-size-sm);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.saved-feedback.visible {
    opacity: 1;
}

/* Ensure the feedback doesn't overlap the input text */
.form-group input {
    padding-right: 4.5rem;
}

/* --- Fix for Centering 2FA Verification Input --- */
#verificationCodeInput {
    padding-left: 0;
    padding-right: 0;
}

/* --- Recovery Codes Modal Styles --- */
.recovery-codes-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Space between each recovery code row */
    margin-top: 2rem;
}

.recovery-code-item {
    display: grid;
    /* We use a grid to ensure perfect alignment of code and button */
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    background-color: var(--background);
}

.recovery-code-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-align: left;
}

/* .recovery-code-item .btn margin-top consolidated above */

/* --- Helper Text Color Classes --- */
.modal-title.text-destructive {
    color: var(--error);
    font-weight: 700;
}

.consequence-list {
    padding-left: 2.5rem;
    color: var(--on-surface-secondary);
    line-height: 1.5;
}

.consequence-list li:not(:last-child) {
    margin-bottom: 0.5rem;
    /* Adds space between list items */
}

/* Enhanced Preferences Styles */
.content-card-description {
    color: var(--on-surface-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}


.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Searchable Country Select */
.searchable-select {
    position: relative;
}

.country-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    background: var(--surface);
    color: var(--on-surface);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.country-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.country-select {
    display: none;
    /* Hidden, used for form submission */
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    max-height: 272px;
    overflow-y: auto;
    z-index: 99999;
    display: none;
    box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.1);
}

.country-dropdown.show {
    display: block;
}

.country-list {
    padding: 0;
}

.country-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-item:hover,
.country-item.highlighted {
    background: hsla(0, 0%, 100%, 0.05);
}

/* Country option styles for new implementation */
.country-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-option:hover,
.country-option.active {
    background: hsla(0, 0%, 100%, 0.05);
}

.country-option:last-child {
    border-bottom: none;
}

/* No results message */
.no-results {
    padding: 1rem;
    text-align: center;
    color: var(--on-surface-secondary);
    font-style: italic;
}

/* Country selector wrapper */
.country-selector-wrapper {
    position: relative;
}

body.light-mode .country-item:hover,
body.light-mode .country-item.highlighted {
    background: var(--hover);
}





/* Preferences Preview */
.preferences-preview {
    padding: 1rem 1.5rem;
    background: var(--surface-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-subtle);
}

.preferences-preview h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
}

.preview-items {
    display: grid;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-label {
    color: var(--on-surface-secondary);
    font-size: 0.9rem;
}

.preview-value {
    font-weight: 500;
    color: var(--on-surface);
    font-size: 0.9rem;
}



/* Profile Sidebar Navigation Icons */
:root {
    --nav-icon-size: 20px;
    --nav-icon-gap: 12px;
    --nav-icon-color: var(--on-surface-secondary);
    --nav-icon-active-color: var(--primary);
}

.profile-sidebar nav a {
    display: flex;
    align-items: center;
    gap: var(--nav-icon-gap);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: var(--on-surface-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    background: transparent;
}

/* Nav icon styling is now handled by fontawesome-fallback.css */

.profile-sidebar nav a:hover:not(.active) {
    background: hsla(0, 0%, 100%, 0.05);
    color: var(--on-surface);
}

/* Hover styling is now handled by fontawesome-fallback.css */

.profile-sidebar nav a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.profile-sidebar nav a.active {
    background: var(--primary);
    color: white;
}

/* Active icon styling is now handled by fontawesome-fallback.css */

/* Theme-specific styling is now handled by fontawesome-fallback.css */
body.light-mode .profile-sidebar nav a:hover:not(.active) {
    background: var(--hover);
    color: var(--on-surface);
}

/* High contrast mode support is now handled by fontawesome-fallback.css */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .profile-sidebar nav a {
        transition: none;
    }
}

.nav-text {
    flex: 1;
}

/* --- Profile Responsive --- */
@media (max-width: 900px) {
    .profile-container {
        grid-template-columns: 1fr;
        /* Stack sidebar and content */
    }

    .profile-sidebar {
        position: static;
        /* Let it scroll normally with content */
    }

    .profile-sidebar nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem;
        /* Allow horizontal scrolling for nav links */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .profile-sidebar nav::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome, Safari, Opera */
    }

    .profile-sidebar nav a {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Preferences responsive adjustments */
    .preferences-grid {
        grid-template-columns: 1fr;
    }

    .country-dropdown {
        max-height: 260px;
    }

    /* Profile sidebar icon responsive adjustments */
    :root {
        --nav-icon-size: 18px;
        --nav-icon-gap: 8px;
    }

    .profile-sidebar nav a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: fit-content;
        /* Ensure icons remain visible in horizontal scroll */
        margin-bottom: 0;
    }

    .profile-sidebar nav a .nav-text {
        white-space: nowrap;
    }
}

/* --- USER PROFILE PAGE - CONTENT SECTIONS --- */

.content-card-title.no-border {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Social Accounts Section */
.account-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.account-summary-info {
    flex: 1;
    min-width: 300px;
}

.account-summary-description {
    margin: 0.5rem 0 1.5rem 0;
    color: var(--on-surface-secondary);
}

.account-summary-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.account-summary-stats .stat-item {
    text-align: center;
}

.account-summary-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.2;
}

.account-summary-stats .stat-label {
    font-size: 0.875rem;
    color: var(--on-surface-secondary);
    margin-top: 0.25rem;
}

.account-meter-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 200px;
}

.account-meter {
    width: 200px;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.account-meter-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--primary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.meter-label {
    font-size: 0.875rem;
    color: var(--on-surface-secondary);
    font-weight: 500;
}

/* Quick Actions Card */
.quick-actions-card {
    margin-top: 1.5rem;
}

.quick-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quick-actions-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}



/* Connection Overview */
.connection-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.connection-count {
    margin-left: 4rem;
    font-size: 1.1rem;
    color: var(--on-surface);
    font-weight: 555;
    flex-shrink: 0;
}

.connection-progress {
    width: 100%;
    max-width: 250px;
    flex-shrink: 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.4s var(--transition-easing);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Platforms Container */
.platforms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Platform Container (Individual Content Cards) */
.platform-container {
    padding: 1.5rem;
    margin-bottom: 0;
}

.platform-card {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 80px;
    position: relative;
}

.platform-card.connected .platform-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1.5rem;
    width: 4px;
    height: 100%;
    background: var(--success);
    border-radius: 2px;
}

.platform-card.warning .platform-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1.5rem;
    width: 4px;
    height: 100%;
    background: var(--warning);
    border-radius: 2px;
}

.platform-card.disconnected {
    opacity: 0.9;
}

/* Platform Content */
.platform-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    position: relative;
}

.platform-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    transition: transform var(--transition-speed) var(--transition-easing);
}

.content-card.platform-container:hover .platform-logo {
    transform: scale(1.05);
}

/* No logo scaling for containers with warning state */
.content-card.platform-container.container-warning:hover .platform-logo {
    transform: none;
}

.platform-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.platform-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--on-surface);
    margin: 0;
    line-height: 1.2;
}

.platform-status {
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-speed) var(--transition-easing);
}

.platform-status.connected {
    color: var(--success);
}

.platform-status.warning {
    color: var(--warning);
}

.platform-status.disconnected {
    color: var(--on-surface-secondary);
}

/* Platform Container Animation */
.platform-container {
    opacity: 1;
    transform: translateY(-5px);
    animation: fadeInUp 0.6s var(--transition-easing) forwards;
}

.platform-container:nth-child(1) {
    animation-delay: 0.1s;
}

.platform-container:nth-child(2) {
    animation-delay: 0.15s;
}

.platform-container:nth-child(3) {
    animation-delay: 0.2s;
}

.platform-container:nth-child(4) {
    animation-delay: 0.25s;
}

.platform-container:nth-child(5) {
    animation-delay: 0.3s;
}

.platform-container:nth-child(6) {
    animation-delay: 0.35s;
}

.platform-container:nth-child(7) {
    animation-delay: 0.4s;
}

.platform-container:nth-child(8) {
    animation-delay: 0.45s;
}

/* Ensure containers are always visible */
.platform-container,
.platform-card {
    opacity: 1 !important;
    visibility: visible !important;
}





/* QR Code Modal Styles */
.qr-code-container {
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--surface-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border);
    text-align: center;
}

.qr-code-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-code {
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}

.manual-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
}

.manual-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-subtle);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    letter-spacing: 2px;
}

/* Enhanced Platform Cards */
.platform-container {
    position: relative;
    overflow: visible;
}

.platform-card {
    position: relative;
}

/* Minimalistic status indicators */
.platform-status {
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-speed) var(--transition-easing);
}

.platform-status.connected {
    color: var(--success);
}

.platform-status.warning {
    color: var(--warning);
}

.platform-status.disconnected {
    color: var(--on-surface-secondary);
}

/* Simple progress bar */
.progress-fill {
    transition: width 0.4s var(--transition-easing);
}

/* Simple loading states */
.platform-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Modal display fix */
.modal.active {
    display: flex !important;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px var(--shadow-color-base);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px var(--success-subtle);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px var(--shadow-color-base);
    }
}

/* Platform Card Buttons */
.platform-card .btn {
    margin: 0;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
    min-width: 90px;
}

.platform-card .connect-btn {
    border-color: var(--success);
    color: var(--success);
    background: transparent;
}

.platform-card .connect-btn:hover:not(:disabled) {
    background: var(--success);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px hsla(159, 82%, 40%, 0.3);
}

.platform-card .disconnect-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--error);
}

.platform-card .disconnect-btn:hover:not(:disabled) {
    background: var(--error);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px hsla(0, 84%, 60%, 0.3);
}

.platform-card .reconnect-btn {
    border-color: var(--warning);
    color: var(--warning);
    background: transparent;
}

.platform-card .reconnect-btn:hover:not(:disabled) {
    background: var(--warning);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px hsla(45, 93%, 47%, 0.3);
}

/* Button Loading States */
.platform-card .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .connection-overview {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .connection-progress {
        max-width: none;
    }

    .platforms-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .platform-container {
        padding: 1.25rem;
    }

    .platform-content {
        gap: 0.75rem;
    }

    .platform-logo {
        width: 40px;
        height: 40px;
    }

    .platform-name {
        font-size: 1rem;
    }

    .content-card:hover {
        transform: none;
    }

    .platform-container:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .platforms-container {
        gap: 0.75rem;
    }

    .platform-container {
        padding: 1rem;
    }

    .platform-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }

    .platform-content {
        justify-content: center;
    }
}

.disconnect-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--error);
}

.disconnect-btn:hover {
    background: var(--error) !important;
    color: hsl(0, 0%, 100%) !important;
}

.reconnect-btn {
    border-color: var(--warning);
    color: var(--warning);
    background: transparent;
}

.reconnect-btn:hover {
    background: var(--warning) !important;
    color: hsl(0, 0%, 100%) !important;
}

/* Modal Enhancements for Social Platforms */
.platform-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-platform-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.connection-steps {
    margin: 1.5rem 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--on-surface-secondary);
    line-height: 1.4;
}

.permissions-info {
    background: var(--surface-secondary);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin: 1.5rem 0;
}

.permissions-info h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.permissions-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.permissions-list li {
    position: relative;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--on-surface-secondary);
}

.permissions-list li::before {
    content: "✓";
    position: absolute;
    left: -1.25rem;
    color: var(--success);
    font-weight: 600;
}

.disconnect-warning {
    display: flex;
    gap: 1rem;
    background: var(--warning-subtle);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin: 1.5rem 0;
}

.warning-icon {
    color: var(--warning);
    flex-shrink: 0;
}

.warning-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--warning);
}

.consequence-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.consequence-list li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--on-surface-secondary);
}

/* Settings Modal */
.modal-large {
    max-width: 600px;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.settings-tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--on-surface-secondary);
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.account-details {
    background: var(--surface-secondary);
    padding: 1rem;
    border-radius: var(--border-radius-md);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.detail-label {
    font-weight: 500;
    color: var(--on-surface-secondary);
}

.detail-value {
    font-weight: 600;
    color: var(--on-surface);
}

.health-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface-secondary);
    border-radius: var(--border-radius-md);
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.setting-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    position: relative;
}

.setting-label input[type="checkbox"]:checked+.checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.setting-label input[type="checkbox"]:checked+.checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-summary-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .account-meter-container {
        align-items: stretch;
    }

    .account-meter {
        width: 100%;
    }

    .account-summary-stats {
        justify-content: space-around;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .social-platform-grid {
        grid-template-columns: 1fr;
    }

    .platform-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .platform-stats {
        justify-content: space-around;
        width: 100%;
    }

    .platform-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .last-sync {
        text-align: center;
    }
}

/* Notification Section */
.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.notification-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.notification-description h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.notification-description p {
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
}

.notification-item .toggle-switch {
    flex-shrink: 0;
    margin-left: 1.5rem;
}

/* Subscription Section */
.subscription-card {
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.current-plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.current-plan-price {
    font-weight: 500;
    margin: 0.5rem 0;
}

/* Referral Section */
#userReferralLink {
    cursor: text;
    background-color: var(--background);
}

@media (max-width: 600px) {

    .subscription-card,
    .account-summary-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .subscription-card .modal-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* --- GLOBAL RESPONSIVE STYLES --- */

/* For Large Desktops and 2K/4K screens */

@media (min-width: 1600px) {
    .contact-container {
        max-width: 1400px;
        /* Allow the contact grid to expand nicely */
    }

    .contact-grid {
        gap: 6rem;
        /* Increase the gap to use the new space */
    }

    .contact-title {
        font-size: 4rem;
        /* Make the title more impactful */
    }
}

/* For Tablets and smaller desktops */
@media (max-width: 1024px) {
    .contact-grid {
        gap: 2rem;
    }

    .contact-title {
        font-size: 2.75rem;
    }

    .contact-info {
        padding-right: 0;
    }

    /* New layout for pricing grid on tablets */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-tier.recommended,
    .pricing-tier.recommended:hover {
        order: 1;
        /* Pro comes first */
        grid-column: 1 / -1;
        /* Span both columns */
        transform: translateY(0);
        /* Reset lift for this layout */
    }

    .pricing-grid .pricing-tier:nth-child(1) {
        /* Starter */
        order: 2;
    }

    .pricing-grid .pricing-tier:nth-child(3) {
        /* Business */
        order: 3;
    }
}

/* For smaller tablets and large phones */
@media (max-width: 768px) {

    /* Reduce padding on primary content boxes for more space */
    .upload-section,
    .modal-content {
        padding: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        /* Stack columns */
        gap: 3rem;
        text-align: center;
    }

    .contact-title {
        font-size: 2.5rem;
    }

    h1.logo-title {
        font-size: 1.8rem;
        /* Slightly smaller auth title on mobile */
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 2.5rem;
    }

    .scheduler-logo-container {
        gap: 1.5rem;
    }

    .pricing-header {
        margin-bottom: 3rem;
    }

    .pricing-tier.recommended {
        grid-column: auto;
        /* Reset column span for mobile stack */
    }

    .header-right-group {
        gap: 1rem;
    }

    .header-nav {
        display: none;
        /* Hiding nav links on mobile for simplicity, can be replaced with a hamburger menu later */
    }

    .home-container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .features-grid,
    .value-prop-grid {
        grid-template-columns: 1fr;
    }
}

/* For small mobile devices */
@media (max-width: 480px) {
    body.with-header {
        /* Adjust padding for a shorter mobile header */
        padding-top: 50px;
    }

    .main-header,
    .user-header {
        /* Reduce padding and height on mobile to save space */
        height: 70px;
        padding: 0.75rem 1rem;
    }

    /* --- Public Header Adjustments --- */
    .header-actions .btn-secondary .button-text {
        /* Hide text on the "Google" button */
        display: none;
    }

    .header-actions .btn-secondary .button-icon {
        /* Remove margin when text is hidden */
        margin-right: 0;
    }

    .header-actions {
        gap: 0.75rem;
        /* Reduce gap between buttons */
    }

    /* --- User Header Adjustments --- */
    .scheduler-logo-container {
        gap: 0.75rem;
        /* Reduce gap between logo and context button */
    }

    .page-context-btn {
        /* Make context button smaller */
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    /* Reduce padding on primary content boxes for more space */
    .upload-section,
    .modal-content {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        /* Stack First/Last name fields */
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* =====
 REFERRAL SECTION ENHANCEMENTS ===== */

/* Referral Section Specific Styles - margin defined above */

.referral-description {
    color: var(--on-surface-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: var(--font-size-sm);
}

.referral-input-group,
.referral-link-group {
    margin-bottom: 1rem;
}

.referral-code-input,
.referral-link-input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 0.5px;
    font-size: var(--font-size-sm);
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--on-surface);
}

.referral-code-input:focus,
.referral-link-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--focus-ring-color);
    outline: none;
}

/* Referral Status Display - styles defined above */

/* .referral-status.success styles defined above */

.referral-status.error {
    background-color: hsla(0, 84%, 60%, 0.1);
    color: var(--error);
    border: 1px solid hsla(0, 84%, 60%, 0.3);
    display: block;
}

.referral-status.info {
    background-color: hsla(239, 84%, 67%, 0.1);
    color: var(--primary);
    border: 1px solid hsla(239, 84%, 67%, 0.3);
    display: block;
}

/* Light mode adjustments for referral status - styles defined above */

body.light-mode .referral-status.error {
    background-color: hsla(0, 75%, 55%, 0.1);
    color: hsl(0, 75%, 45%);
    border-color: hsla(0, 75%, 55%, 0.3);
}

body.light-mode .referral-status.info {
    background-color: hsla(242, 80%, 60%, 0.1);
    color: hsl(242, 80%, 50%);
    border-color: hsla(242, 80%, 60%, 0.3);
}

/* Enhanced referral input validation styles */
.referral-code-input.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 2px var(--error-focus-ring-color);
}

.referral-code-input.invalid:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-focus-ring-color);
}

/* Loading state improvements */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading .btn-spinner {
    animation: spin 1s linear infinite;
}

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

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

/* Success state for applied referral */
.referral-input-group.applied .referral-code-input {
    background-color: var(--success-bg, hsla(159, 82%, 40%, 0.1));
    border-color: var(--success, hsl(159, 82%, 40%));
    color: var(--success);
}

.referral-input-group.applied .btn {
    background-color: var(--success);
    border-color: var(--success);
    cursor: not-allowed;
}

/* Referral Benefits Section */
.referral-benefits {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: var(--surface);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border);
}

.referral-benefits:hover {
    border-color: hsla(239, 84%, 67%, 0.3);
    box-shadow: 0 2px 8px var(--shadow-color-base);
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.benefit-text {
    color: var(--on-surface-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

/* Referral Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.25rem 1rem;
    background-color: var(--background);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border);
}

.stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color-base);
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--on-surface-secondary);
    font-weight: 500;
}

/* Applied Referral Information */
.applied-referral {
    padding: 1rem 1.25rem;
    background-color: hsla(239, 84%, 67%, 0.1);
    border: 1px solid hsla(239, 84%, 67%, 0.3);
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
}

.applied-text {
    margin: 0;
    color: var(--primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

body.light-mode .applied-referral {
    background-color: hsla(242, 80%, 60%, 0.1);
    border-color: hsla(242, 80%, 60%, 0.3);
}

body.light-mode .applied-text {
    color: hsl(242, 80%, 50%);
}

/* Button Loading States */
.btn .btn-spinner {
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    display: none;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading .btn-text {
    opacity: 0.7;
}

.btn.loading .btn-spinner {
    display: inline-block;
}

/* Copy Button Feedback */
.btn.copied {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: white !important;
    transform: scale(0.95);
}

.btn.copied .btn-text::after {
    content: ' ✓';
}

.card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px hsla(239, 84%, 67%, 0.3);
}

.preview-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    border: 2px solid var(--border);
}

.preview-card .card-icon {
    background: linear-gradient(135deg, var(--success), hsl(159, 82%, 54%));
    box-shadow: 0 4px 12px hsla(159, 82%, 40%, 0.3);
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Referral Input Enhancements */
.referral-code-input::placeholder,
.referral-link-input::placeholder {
    color: var(--on-surface-secondary);
    opacity: 0.7;
}

.referral-code-input:disabled,
.referral-link-input:disabled {
    background-color: var(--background);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enhanced Input with Button for Referral */
.referral-input-group .input-with-button,
.referral-link-group .input-with-button {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: border-color var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
}

/* Unified focus state for the entire input-button group */
.referral-input-group .input-with-button:focus-within,
.referral-link-group .input-with-button:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--focus-ring-color);
}

.referral-input-group .input-with-button input,
.referral-link-group .input-with-button input {
    flex: 1;
    border: none;
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background: transparent;
    outline: none;
    box-shadow: none;
    padding: 0.8rem 1rem;
}

.referral-input-group .input-with-button input:focus,
.referral-link-group .input-with-button input:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Remove number input arrows */
.referral-code-input::-webkit-outer-spin-button,
.referral-code-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.referral-code-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.referral-input-group .input-with-button .btn,
.referral-link-group .input-with-button .btn {
    border: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
    white-space: nowrap;
    min-width: auto;
    margin: 0;
    /* Override the general input-with-button hiding rules */
    max-width: none !important;
    opacity: 1 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    flex-shrink: 0;
}

/* Button Loading States for Referral */
.referral-input-group .btn.loading,
.referral-link-group .btn.loading {
    position: relative;
    pointer-events: none;
}

.referral-input-group .btn.loading .btn-text,
.referral-link-group .btn.loading .btn-text {
    opacity: 0.7;
}

.referral-input-group .btn .btn-spinner,
.referral-link-group .btn .btn-spinner {
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    display: none;
}

.referral-input-group .btn.loading .btn-spinner,
.referral-link-group .btn.loading .btn-spinner {
    display: inline-block;
}

/* Button Feedback Animations */
.referral-input-group .btn.success,
.referral-link-group .btn.success {
    background-color: var(--success);
    border-color: var(--success);
    transform: scale(1.02);
}

.referral-input-group .btn.success .btn-text,
.referral-link-group .btn.success .btn-text {
    animation: successPulse 0.3s ease-out;
}

.referral-input-group .btn.copied,
.referral-link-group .btn.copied {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
    animation: copySuccess 0.4s ease-out;
}

/* Copy Success Animation */
@keyframes copySuccess {
    0% {
        transform: scale(1);
        background-color: var(--primary);
    }

    50% {
        transform: scale(1.05);
        background-color: var(--success);
    }

    100% {
        transform: scale(1);
        background-color: var(--success);
    }
}

@keyframes successPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

/* Responsive Design for Referral Section */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .benefit-item {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem 0;
    }

    .benefit-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .referral-benefits {
        padding: 1rem;
    }

    .stat-item {
        padding: 1rem 0.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .referral-input-group .input-with-button,
    .referral-link-group .input-with-button {
        flex-direction: column;
    }

    .referral-input-group .input-with-button input,
    .referral-link-group .input-with-button input {
        border-radius: var(--border-radius-sm);
        border-right: 1px solid var(--border);
        margin-bottom: 0.5rem;
    }

    .referral-input-group .input-with-button .btn,
    .referral-link-group .input-with-button .btn {
        border-radius: var(--border-radius-sm);
        width: 100%;
    }
}

@media (max-width: 480px) {

    .referral-apply-card,
    .referral-share-card,
    .referral-stats-card {
        margin-bottom: 1rem;
    }

    .referral-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .benefit-text {
        font-size: 0.85rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

/* Animation for referral status messages */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.referral-status.success,
.referral-status.error,
.referral-status.info {
    animation: slideInDown 0.3s var(--transition-easing);
}

/* Focus management for accessibility */
.referral-code-input:focus+.btn,
.referral-link-input:focus+.btn {
    border-color: var(--border-focus);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .referral-benefits {
        border-width: 2px;
    }

    .stat-item {
        border-width: 2px;
    }

    .referral-status.success,
    .referral-status.error,
    .referral-status.info {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .stat-item:hover {
        transform: none;
    }

    .referral-status.success,
    .referral-status.error,
    .referral-status.info {
        animation: none;
    }

    .btn.copied {
        transform: none;
    }
}

/* Addi
tional Referral Section Enhancements */

/* Hover effects for referral cards */
.referral-apply-card:hover,
.referral-share-card:hover,
.referral-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px var(--shadow-color-base),
        0 4px 10px -6px var(--shadow-color-layer);
    transition: transform var(--transition-speed) var(--transition-easing),
        box-shadow var(--transition-speed) var(--transition-easing);
}

/* Enhanced focus states for accessibility */
.referral-code-input:focus,
.referral-link-input:focus {
    transform: scale(1.01);
    transition: transform var(--transition-speed) var(--transition-easing);
}

/* Button hover enhancements for referral section */
.referral-input-group .btn:hover:not(:disabled):not(.loading),
.referral-link-group .btn:hover:not(:disabled):not(.loading) {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px var(--shadow-highlight);
}

/* Loading state improvements */
.referral-input-group .btn.loading:hover,
.referral-link-group .btn.loading:hover {
    transform: none;
    box-shadow: none;
}

/* Enhanced theme support for light mode */
body.light-mode .referral-benefits {
    background-color: hsla(220, 25%, 95%, 0.8);
    border-color: hsla(220, 20%, 85%, 0.8);
}

body.light-mode .referral-benefits:hover {
    border-color: hsla(242, 80%, 60%, 0.4);
    background-color: hsla(242, 80%, 60%, 0.05);
}

body.light-mode .stat-item {
    background-color: hsla(220, 25%, 95%, 0.8);
    border-color: hsla(220, 20%, 85%, 0.8);
}

/* Improved button feedback for light mode */
body.light-mode .referral-input-group .btn.copied,
body.light-mode .referral-link-group .btn.copied {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

body.light-mode .referral-input-group .btn.success,
body.light-mode .referral-link-group .btn.success {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .referral-description {
        font-size: var(--font-size-sm);
        line-height: 1.4;
    }

    .benefit-text {
        font-size: 0.8rem;
    }

    .referral-input-group .btn,
    .referral-link-group .btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .referral-status {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Improved animation performance */
.referral-input-group .btn,
.referral-link-group .btn,
.referral-apply-card,
.referral-share-card,
.referral-stats-card {
    will-change: transform;
}

/* Reset will-change after animations */
.referral-input-group .btn:not(:hover):not(.loading):not(.copied):not(.success),
.referral-link-group .btn:not(:hover):not(.loading):not(.copied):not(.success),
.referral-apply-card:not(:hover),
.referral-share-card:not(:hover),
.referral-stats-card:not(:hover) {
    will-change: auto;
}


/* Enhanced Preferences Cards */
.preferences-card {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) var(--transition-easing);
    border: 1px solid var(--border);
    background: var(--surface);
}

.preferences-card:hover {
    box-shadow: 0 8px 25px -5px var(--shadow-color-base),
        0 4px 10px -6px var(--shadow-color-layer);
    transform: translateY(-2px);
}

/* Card Headers */
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.card-header-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px hsla(239, 84%, 67%, 0.3);
}

.card-header-text {
    flex: 1;
}

.card-header-text .content-card-title {
    margin: 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.card-header-text .content-card-description {
    color: var(--on-surface-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.card-header .btn {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* Responsive adjustments for card headers */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .card-icon {
        align-self: center;
    }
    
    .card-header .btn {
        align-self: center;
        margin-top: 0;
    }
}

/* Light mode adjustments */
body.light-mode .preferences-card {
    background: var(--surface);
    border-color: var(--border);
}

.preferences-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border);
}

.preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.preview-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-speed) var(--transition-easing);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item:hover {
    background: var(--surface);
    margin: 0 -0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    border-bottom: 1px solid transparent;
}

.preview-item:hover:last-child {
    border-bottom: none;
}

.preview-label {
    font-size: 0.9rem;
    color: var(--on-surface-secondary);
    font-weight: 500;
}

.preview-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-surface);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
}

/* Light mode adjustments */
body.light-mode .preferences-preview {
    background: var(--surface);
}

body.light-mode .preview-item:hover {
    background: var(--background);
}

body.light-mode .preview-value {
    background: var(--background);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .preview-items {
        gap: 0.5rem;
    }

    .preview-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem 0;
    }

    .preview-value {
        align-self: stretch;
        text-align: center;
    }
}/* Arrow 
indicator for Country/Region input */
.country-selector-wrapper::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--on-surface-secondary);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.country-selector-wrapper:hover::after {
    color: var(--primary);
}

/* Ensure the country input has proper padding to avoid overlap with arrow */
.country-search-input {
    padding-right: 2.5rem !important;
}/* Co
untry dropdown with code-first layout */
.country-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-speed) var(--transition-easing);
    cursor: pointer;
    font-size: 0.95rem;
}

.country-option:hover,
.country-option.active {
    background: var(--primary-subtle);
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px);
}

.country-option:last-child {
    border-bottom: none;
}

.country-code {
    font-size: 0.85rem;
    color: var(--on-surface-secondary);
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.8;
    transition: all var(--transition-speed) var(--transition-easing);
}

.country-name {
    flex: 1;
    font-weight: 500;
    color: var(--on-surface);
}

.country-option:hover .country-code,
.country-option.active .country-code {
    opacity: 1;
    background: var(--primary-subtle);
    color: var(--primary);
    transform: scale(1.05);
}

.country-option:hover .country-name,
.country-option.active .country-name {
    color: var(--primary);
    font-weight: 600;
}