@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Soft, light iOS-style background */
    background-color: #f2f2f7;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: #1c1c1e; /* iOS primary text color */
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Light Glassmorphism Core */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.glass-navbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.main-wrapper {
    padding-top: 120px;
    padding-bottom: 60px;
}

/* Form Controls */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #3a3a3c;
}

.form-control, .form-select {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1c1c1e !important;
    border-radius: 14px;
    padding: 12px 18px;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: #8e8e93;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15) !important;
    background: #ffffff !important;
    border-color: #007aff !important; /* iOS Blue */
}

/* Buttons */
.btn-custom {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    color: #1c1c1e;
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1c1c1e;
    transform: translateY(-2px);
}

.btn-custom-primary {
    background: #007aff; /* iOS Blue */
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background: #0062cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

/* Dashboard Cards */
.dash-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Links */
a {
    text-decoration: none;
    color: #007aff;
    transition: color 0.2s;
}
a:hover {
    color: #0056b3;
}

/* OVERRIDE PREVIOUS DARK THEME HTML CLASSES */
.text-white { color: #1c1c1e !important; }
.text-light { color: #8e8e93 !important; }
.bg-white.bg-opacity-25 { background: rgba(0,122,255,0.1) !important; color: #007aff !important;}

/* --- Floating Footer Navigation (Tab Bar) - 5 Icons --- */
.bottom-tab-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 500px; /* Increased width for 5 icons */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 10px 15px; /* Slightly reduced horizontal padding */
    display: flex;
    justify-content: space-between; /* Spreads the 5 icons evenly */
    align-items: center;
    z-index: 1050;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e93; /* Unselected iOS Grey */
    text-decoration: none;
    font-size: 0.7rem; /* Slightly smaller text for 5 items */
    font-weight: 500;
    padding: 6px 12px; /* Reduced padding for 5 items */
    border-radius: 20px;
    transition: all 0.3s ease;
    min-width: 60px; /* Ensures text doesn't collapse */
}

.tab-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.tab-item:hover {
    color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.tab-item.active {
    color: #007aff; /* iOS Blue */
}

.tab-item.active i {
    transform: translateY(-2px);
}

/* Floating Create Button in Center (Remains the same) */
.tab-item-create {
    background: #007aff;
    color: white !important;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
    transform: translateY(-15px); /* Makes it pop out of the bar */
    border: 4px solid #f2f2f7; /* Matches body background */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0; /* Prevents the circle from squishing */
}

.tab-item-create i {
    font-size: 1.8rem;
    margin: 0;
}

.tab-item-create:hover {
    transform: translateY(-18px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 122, 255, 0.4);
}


/* Brand Logo Styling */
.brand-logo-container {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 20px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.brand-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.brand-img-placeholder {
    width: 100%;
    height: 100%;
    background: #007aff;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Dashboard spacing adjustments */
.dash-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dash-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Dropdown styling */
.dropdown-item {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

/* Carousel Item Height Fix */
.carousel-item {
    transition: transform .4s ease-in-out;
}

/* List Group Item Styling */
.list-group-item {
    transition: background 0.2s ease;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer;
}

/* Badge Tweaks */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 6px 12px;
}

/* Custom compact button text */
.btn-sm {
    font-size: 0.8rem;
    padding: 5px 15px;
}

/* Ensure Logo in Carousel looks consistent */
.carousel-item .glass-panel img {
    background: #fff;
    padding: 3px;
}

/* Compact Brand List Styling */
.brand-list-container .brand-item:last-child {
    border-bottom: none !important;
}

.brand-mini-logo {
    width: 42px;
    height: 42px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
}

.brand-mini-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Section Headers */
.section-header h6 {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    color: #8e8e93;
}

/* Activity List Item Hover */
.activity-list > div:hover, .brand-item:hover {
    background: rgba(0, 122, 255, 0.03);
    cursor: pointer;
    transition: background 0.2s ease;
}

/* Badge Styling */
.badge {
    padding: 5px 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Adjusting credits bar glass effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* --- Compact Layout Styling --- */

/* Credit Box */
.credit-icon-box {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Section Titles */
.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8e8e93;
    font-weight: 600;
}

/* Brand Thumbnails in List */
.brand-thumb-logo {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 4px;
}

.brand-thumb-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #007aff;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Compact Brand Action Button */
.btn-custom-action {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border: none;
    border-radius: 10px;
    padding: 6px 10px;
    transition: all 0.2s;
}

.btn-custom-action:hover {
    background: #007aff;
    color: #fff;
}

/* Activity Icons */
.activity-icon-box {
    color: #007aff;
    font-size: 1.2rem;
}

/* iOS Style Badges */
.badge-ios {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.4px;
}

.badge-ios-success {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.badge-ios-warning {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}

/* Remove last border in lists */
.brand-compact-item:last-child, .activity-compact-list > div:last-child {
    border-bottom: none !important;
}

/* Premium Input Grouping */
.input-group-text {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 14px 0 0 14px;
    padding-left: 15px;
    padding-right: 15px;
}

.input-group .form-control {
    border-radius: 0 14px 14px 0 !important;
}

/* Custom Social Colors */
.text-facebook { color: #1877F2 !important; }
.text-instagram { color: #E4405F !important; }

/* Section Spacing */
.tracking-wider {
    letter-spacing: 1px;
}

/* Make Form Controls look lighter inside cards */
.glass-panel .form-control, .glass-panel .form-select {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Shadow for the big primary button */
.btn-custom-primary.shadow-lg {
    box-shadow: 0 15px 35px rgba(0, 122, 255, 0.25) !important;
}

/* Step Containers */
.step-container {
    display: none;
    animation: fadeIn 0.4s ease;
}
.step-container.active {
    display: block;
}

/* Step Indicators (Dots) */
.step-dot {
    width: 30%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}
.step-dot.active {
    background: #007aff;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.3);
}

/* Brand Chip UI */
.brand-chip {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    padding: 6px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
}
.chip-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    background: white;
    object-fit: contain;
}

/* Modal Brand Selection */
.brand-select-item {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.brand-select-item:hover {
    background: white;
    border-color: #007aff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload Grid Styling */
.upload-slot {
    aspect-ratio: 1/1;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed rgba(0, 122, 255, 0.2);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.upload-slot:active {
    transform: scale(0.95);
    background: rgba(0, 122, 255, 0.05);
}

.slot-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.slot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* iOS Style Progress Bar */
.progress-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-inner {
    width: 0%;
    height: 100%;
    background: #007aff;
    transition: width 0.3s ease;
}

/* Floating Remove Button */
.btn-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 59, 48, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.upload-slot {
    aspect-ratio: 1/1;
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(0, 122, 255, 0.15);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-slot.has-image {
    border: 2px solid transparent;
}

.btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 59, 48, 0.9);
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.05);
}

.progress-bar-inner {
    height: 100%;
    background: #007aff;
    width: 0;
    transition: width 0.3s ease;
}

/* iOS Segmented Control */
.segmented-control {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 2px;
}
.segmented-control input { display: none; }
.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1;
    cursor: pointer;
    color: #8e8e93;
    transition: color 0.3s;
}
.segmented-control input:checked + label { color: #000; }
.segmented-glider {
    position: absolute;
    height: calc(100% - 4px);
    width: calc(50% - 4px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    transition: transform 0.3s ease;
}
#male:checked ~ .segmented-glider { transform: translateX(100%); }



/* --- Improved Model Card CSS --- */

.model-avatar {
    position: relative; /* The anchor for our absolute badges */
    width: 85px;        /* Fixed size for consistent alignment */
    height: 85px;
    margin: 0 auto 10px;
}

.model-img-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden; /* This ONLY clips the image now */
    border: 3px solid transparent;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.model-card.active .model-img-wrapper {
    border-color: #007aff;
    transform: scale(1.05);
}

.model-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Premium Gem Badge - Positioned to pop out of top-right */
.premium-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FFD700;
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border: 2px solid #fff;
}

/* Selection Tick - Positioned to pop out of bottom-right */
.selection-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #fff;
    color: #007aff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 24px; /* Icon size */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    line-height: 1;
}

.model-card.active .selection-check {
    display: flex;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Locked state for Free users seeing Premium models */
.model-locked .model-img-wrapper {
    filter: grayscale(1) opacity(0.5);
    background: #e5e5ea;
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* --- Fix Model Name Alignment --- */
.model-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.model-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1c1c1e;
    text-align: center;
    width: 100%;
    margin-top: 8px;
    line-height: 1.2;
    display: block;
}

/* --- Info (Peek) Button --- */
.info-btn {
    position: absolute;
    top: -2px;
    left: -2px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    color: #007aff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* --- Profile Modal Styling --- */
.model-profile-video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    background: #000;
}

.profile-stat-box {
    background: rgba(0,0,0,0.03);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}

.profile-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #8e8e93;
    display: block;
    margin-bottom: 2px;
}

.profile-stat-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1c1c1e;
}

/* Audio Upload Zone */
.audio-upload-zone {
    border: 2px dashed rgba(0, 122, 255, 0.2);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.audio-upload-zone.has-audio {
    border: 2px solid #007aff;
    background: rgba(0, 122, 255, 0.05);
}

/* iOS Switch Styling */
.ios-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    background-color: #e9e9ea;
    border: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    transition: background-position 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.ios-switch .form-check-input:checked {
    background-color: #34c759; /* iOS Green */
    background-position: right center;
}

.ios-switch .form-check-input:focus {
    box-shadow: none;
    border: none;
}

/* Language Cards */
.lang-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-card.active {
    background: #007aff;
    color: #fff !important;
    border-color: #007aff;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}

.lang-card.active span { color: #fff !important; }

/* Small Round Play Button */
.btn-play-sample {
    width: 32px;
    height: 32px;
    background: #fff;
    color: #007aff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.btn-play-sample:active {
    transform: scale(0.9);
}

.lang-card.active .btn-play-sample {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Status Tabs (iOS Horizontal Scroll) */
.status-tabs-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.status-tabs-container::-webkit-scrollbar { display: none; }

.status-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 12px;
    min-width: 100%;
}

.status-tab {
    flex: 1;
    padding: 8px 15px;
    text-decoration: none;
    color: #8e8e93;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.status-tab.active {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Status Badges Colors */
.badge-ios-info { background: rgba(0, 122, 255, 0.1); color: #007aff; }
.badge-ios-danger { background: rgba(255, 59, 48, 0.1); color: #ff3b30; }

/* Brand Mini Logo for Campaign List */
.brand-mini-logo {
    width: 45px;
    height: 45px;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.03);
}
.brand-mini-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Live Pulse Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.6);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.03);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Resource (Folder) Items */
.resource-item {
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.resource-item:hover {
    background: rgba(0, 122, 255, 0.05);
}

.resource-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.disabled-resource {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

/* Section Title */
.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8e8e93;
    font-weight: 700;
}

/* --- Digital Wallet Card Styling --- */
.wallet-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 244, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 1);
    position: relative;
    overflow: hidden;
    color: #1c1c1e;
}

/* Subtle background pattern for the wallet */
.wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(0, 122, 255, 0.05);
    border-radius: 50%;
    filter: blur(40px);
}

.wallet-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #8e8e93;
    letter-spacing: 1px;
}

.wallet-balance {
    font-size: 2.4rem;
    letter-spacing: -1px;
    color: #000;
}

.wallet-balance small {
    font-size: 1.2rem;
    margin-left: 2px;
    margin-right: 5px;
}

.wallet-icon {
    font-size: 1.5rem;
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

/* Recharge Button */
.recharge-btn {
    background: #000; /* Sleek black iOS button */
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recharge-btn:active {
    transform: scale(0.95);
    background: #1c1c1e;
}

.recharge-btn i {
    font-size: 1rem;
}

/* Wallet Status Dot */
.wallet-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #34c759; /* iOS Green */
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

/* --- Redesigned iOS Floating Tab Bar --- */
.bottom-tab-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 5px;
    z-index: 2000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #8e8e93; /* iOS Secondary Grey */
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
}

.tab-item i {
    font-size: 1.4rem;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
}

.tab-item.active {
    color: #007aff; /* iOS Blue */
}

.tab-item.active i {
    transform: translateY(-2px);
}

/* Floating Center Button Container */
.create-button-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    top: -20px; /* Moves the button up */
}

.tab-item-create {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 5px solid #f2f2f7; /* Matches body background to look floating */
}

.tab-item-create:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Padding for main wrapper so content isn't covered */
.main-wrapper {
    padding-bottom: 110px !important;
}

/* --- Premium iOS Top Navigation Bar --- */
.glass-navbar {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1); /* iOS uses very thin borders */
    height: 60px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    z-index: 1030;
}

/* Header Left/Center/Right Layout */
.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c1c1e; /* iOS Dark Primary text */
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-brand-minimal {
    font-size: 1.4rem;
    text-decoration: none;
}

/* Nav Icons (Back, Profile) */
.nav-icon-link {
    color: #007aff; /* iOS Blue */
    font-size: 1.4rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-icon-link:active {
    opacity: 0.4; /* iOS tap effect */
}

/* Sleek Auth Links */
.btn-ios-link {
    color: #007aff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0;
    border: none;
}

/* Main Wrapper Adjustment */
.main-wrapper {
    padding-top: 80px; /* Space for the fixed header */
}

/* Remove default Bootstrap focus shadows */
.navbar-toggler:focus {
    box-shadow: none !important;
}

/* --- iOS Profile / Settings Styling --- */

/* Large Avatar */
.profile-avatar-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 4px solid #fff;
}

.avatar-letter {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
}

.premium-badge-profile {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ffcc00;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Settings Group Title (iOS Labels) */
.settings-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8e8e93; /* iOS Secondary Grey */
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 15px;
    margin-bottom: 8px;
}

/* Settings Rows */
.settings-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    color: #1c1c1e;
    transition: background 0.2s;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.settings-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 12px;
}

.settings-label {
    flex-grow: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.settings-value {
    color: #8e8e93;
    font-size: 0.9rem;
}

/* Specific iOS Danger Style */
.settings-item.text-danger {
    background: rgba(255, 255, 255, 0.7);
}

/* --- Transaction History Styling --- */

.transaction-list .transaction-item:last-child {
    border-bottom: none !important;
}

.trx-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(52, 199, 89, 0.1); /* iOS Green Background */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.transaction-item {
    transition: background 0.2s ease;
}

.transaction-item:active {
    background: rgba(0, 0, 0, 0.05);
}

/* Modal Styling */
.list-group-item {
    border-color: rgba(0,0,0,0.05) !important;
}

.list-group-item:hover {
    background: #fff !important;
}

/* Wallet card typography balance */
.wallet-balance small {
    font-size: 0.9rem;
    color: #8e8e93;
    margin-right: 4px;
}

/* --- iOS Style Range Slider --- */
.ios-slider {
    /* -webkit-appearance: none; */
    width: 100%;
    height: 6px;
    background: #e5e5ea;
    border-radius: 10px;
    outline: none;
    margin: 20px 0;
}

.ios-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 3px 1px rgba(0,0,0,0.06);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.ios-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

/* Price Sheet Styling */
.price-sheet {
    border: 1px solid rgba(0,0,0,0.05);
}

.calculator-box h2 small {
    color: #8e8e93;
    margin-left: 2px;
}

.text-primary {
    color: #007aff !important; /* Standard iOS Blue */
}

/* Modal Close Button Tweak */
.btn-close {
    background-color: #f2f2f7;
    border-radius: 50%;
    padding: 8px;
    font-size: 0.6rem;
    opacity: 1;
}

/* --- Segmented Tabs for Plans --- */
.segmented-control {
    display: flex;
    position: relative;
    background: #f2f2f7;
    border-radius: 12px;
    padding: 2px;
    height: 45px;
}
.segmented-control input { display: none; }
.segmented-control label {
    flex: 1;
    text-align: center;
    line-height: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1;
    cursor: pointer;
    color: #8e8e93;
    transition: color 0.3s;
}
.segmented-control input:checked + label { color: #000; }
.segmented-control input:disabled + label { opacity: 0.3; cursor: not-allowed; }

.segmented-glider {
    position: absolute;
    height: calc(100% - 4px);
    width: calc(50% - 4px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#premium_plan:checked ~ .segmented-glider { transform: translateX(100%); }

/* --- PWA App Feeling Enhancements --- */
html, body {
    overscroll-behavior-y: contain; /* Prevents bounce effect in some browsers */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none; /* Prevents text selection like a native app */
}

/* Allow text selection only in inputs and textareas */
input, textarea {
    user-select: text !important;
}

/* Adjust top padding for iPhones with "Notches" (Safe Area) */
.glass-navbar {
    padding-top: env(safe-area-inset-top) !important;
    height: calc(60px + env(safe-area-inset-top)) !important;
}

.main-wrapper {
    padding-top: calc(85px + env(safe-area-inset-top)) !important;
}

.bottom-tab-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
}

/* --- StarCast Brand Palette --- */
:root {
    --starcast-yellow: #FFCC00;
    --starcast-purple: #3E0099;
    --starcast-bg: #fdfdfd;
}

body {
    background-color: var(--starcast-bg);
    /* Subtle yellow glow in the background */
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 204, 0, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(62, 0, 153, 0.05) 0px, transparent 50%);
    color: #1c1c1e;
}

/* Update Header & Icons to Purple */
.header-title {
    color: var(--starcast-purple) !important;
    font-weight: 800;
}

.nav-icon-link, .bi-play-circle-fill {
    color: var(--starcast-purple) !important;
}

/* Update Primary Buttons to StarCast Purple */
.btn-custom-primary {
    background: var(--starcast-purple) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(62, 0, 153, 0.2) !important;
}

.btn-custom-primary:hover {
    background: #31007a !important;
    transform: translateY(-2px);
}

/* Update Active Tab and Slider to Purple */
.tab-item.active, .ios-slider::-webkit-slider-thumb {
    color: var(--starcast-purple) !important;
}

.progress-bar-inner, .status-tab.active {
    background: var(--starcast-purple) !important;
}

/* Specific Accent for Wallet/Recharge */
.wallet-icon {
    color: var(--starcast-purple);
    background: rgba(62, 0, 153, 0.1);
}

.recharge-btn {
    background: var(--starcast-yellow);
    color: var(--starcast-purple) !important;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

.recharge-btn:active {
    background: #e6b800;
}

/* Floating Create Button (+) */
.tab-item-create {
    background: linear-gradient(135deg, var(--starcast-purple) 0%, #290066 100%) !important;
    border: 5px solid #f2f2f7 !important;
}

/* --- Premium iOS Header Fix --- */


/* Ensure container takes full width/height for alignment */
.glass-navbar .container {
    height: 100%;
}

.header-left, .header-right {
    flex: 1; /* These grow equally, pushing the center to the exact middle */
    height: 100%;
}

.header-center {
    flex: 2; /* Center takes more space for the title */
    height: 100%;
    text-align: center;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--star-purple) !important;
    letter-spacing: -0.5px;
    text-decoration: none;
    line-height: 1;
}

.nav-icon-link {
    color: var(--star-purple) !important;
    font-size: 1.6rem; /* Slightly larger for easier tapping */
    text-decoration: none;
    line-height: 1; /* Prevents alignment shifts */
    display: flex;
    align-items: center;
}

.nav-icon-link:active {
    opacity: 0.4;
}

/* Specific fix for the Person Circle icon which often has extra padding */
.bi-person-circle {
    display: block;
    margin: 0;
}

/* --- Splash / Landing Page Styling --- */

.fw-800 { font-weight: 800; }

.splash-logo-container {
    display: flex;
    justify-content: center;
    animation: float 4s ease-in-out infinite;
}

.splash-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--star-purple) 0%, #290066 100%);
    color: #fff;
    font-size: 4rem;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #fff;
}

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Soft Landing Link */
.btn-ios-link {
    font-size: 0.95rem;
    color: var(--star-grey);
}

/* Background Glowing Bubbles */
.splash-bg-decoration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--star-purple);
    filter: blur(150px);
    opacity: 0.05;
    z-index: -1;
    border-radius: 50%;
}

/* Ensure body on index doesn't show scrollbars unnecessarily */
body.index-page {
    overflow: hidden;
}

/* --- High-Visibility Project Cards --- */
.project-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:active {
    transform: scale(0.98);
}

.project-card.draft-mode {
    background: rgba(255, 255, 255, 0.6);
}

/* Square Brand Logo Container */
.brand-sq-logo {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 14px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-sq-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Compact Card Action Bar */
.card-action-bar a {
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.card-action-bar a:active {
    background: rgba(0,0,0,0.03);
}

/* Empty State Styling */
.empty-state-icon {
    width: 120px;
    height: 120px;
    background: rgba(0,0,0,0.02);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.display-none {
    display: none !important;
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease forwards;
}

/* Gallery: Original Ratio */
.photo-item {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.photo-item img {
    width: 100%;
    height: auto; /* Maintains original aspect ratio */
    display: block;
    cursor: zoom-in;
}

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay img {
    max-width: 95%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.close-lightbox {
    position: absolute;
    top: 40px;
    right: 20px;
    background: var(--starcast-purple);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.bi-spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Specific styling for the disabled start button */
#startVisitBtn.disabled {
    pointer-events: none;
    filter: grayscale(1);
    background: #c7c7cc !important;
    border: none;
}