/* /themes/default/assets/css/models.css */

/* Model Page Layout - Same as index layout */
.main-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.content-area {
    flex: 1;
    padding: 2rem;
}

.sidebar {
    width: 320px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    position: static;
    overflow: visible;
}

/* Model Page Header */
.model-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.model-title-section h1.model-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.model-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.model-quick-stats {
    display: none; /* Hide this section since info is on video */
}

.status-badge,
.viewers-badge,
.followers-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge.status-online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.status-offline {
    background: rgba(156, 163, 175, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.viewers-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.followers-badge {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.model-actions {
    display: flex;
    gap: 1rem;
}

.back-to-home-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-home-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Video Section */
.video-section {
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 3;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* UPDATED: TikTok-style video handling */
#streamVideo {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 2 !important;
    transition: all 0.3s ease;
}

/* TikTok Portrait Video Styles */
#streamVideo.portrait-video {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    transform: translate(-50%, -50%) !important;
    z-index: 3 !important;
}

/* Portrait Video Background Blur */
.video-player.portrait-mode::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(20px) brightness(0.3) saturate(1.5);
    z-index: 1;
    transform: scale(1.1);
}

/* Portrait Video Indicator */
.video-orientation-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: linear-gradient(135deg, #9c88ff, #8c7ae6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(156, 136, 255, 0.3);
    box-shadow: 0 2px 8px rgba(156, 136, 255, 0.4);
}

/* Clickable Video Overlay */
.clickable-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    cursor: pointer;
    background: transparent;
}

/* Custom Video Controls */
.custom-video-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.mute-toggle-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

.mute-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.mute-toggle-btn:active {
    transform: scale(0.95);
}

/* Video Status - Same height for both elements */
.video-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4;
}

.status-live {
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    height: 36px;
    min-height: 36px;
}

.status-live .status-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.viewers-count {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    height: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Offline Video */
.video-offline {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--bg-tertiary);
    overflow: hidden;
    cursor: pointer;
}

.offline-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.offline-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
}

.offline-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.offline-overlay p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
}

.next-online {
    color: var(--accent-secondary) !important;
    font-weight: 600;
}

/* Chat Button */
.chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #dc2626 100%);
    color: white;
    border-radius: var(--card-radius);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
    text-decoration: none;
}

.chat-button:active {
    transform: translateY(0);
}

/* Model Information Table */
.model-info-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.model-info-table h2 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-table-grid {
    display: grid;
    gap: 0;
}

.info-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: start;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row.full-width {
    grid-template-columns: 200px 1fr;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

/* Online/Offline Status Colors */
.status-online-now {
    color: var(--success) !important;
    font-weight: 600;
}

.status-offline {
    color: #f87171 !important;
    font-weight: 600;
}

/* Model Information Tags - with extra left/right padding */
.model-info-table .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.model-info-table .tag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-height: 38px;
}

.model-info-table .tag-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.model-info-table .tag-link:hover::before {
    left: 100%;
}

.model-info-table .tag-link:hover {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #dc2626 100%);
    color: white;
    border-color: var(--accent-primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.model-info-table .tag-link:active {
    transform: translateY(0);
}

.country-flag-small {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Heatmap Section - Fixed layout issues */
.heatmap-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible;
}

.heatmap-section h2 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timezone-info {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.timezone-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.current-time {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-family: monospace;
}

/* Heatmap Container - Fixed to prevent layout issues */
.heatmap-container {
    overflow: visible;
    width: 100%;
    display: block !important;
    visibility: visible !important;
}

/* Model Heatmap Table - Fixed column alignment */
.model-heatmap {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1px;
    background: transparent;
    display: table !important;
    visibility: visible !important;
    table-layout: fixed;
}

/* Table Headers */
.day-header {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.4rem 0.3rem;
    font-size: 0.75rem;
    text-align: right;
    padding-right: 3px;
    border-radius: 3px;
    font-weight: 600;
    width: 80px;
    min-width: 80px;
}

.hour-header {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.4rem 0.2rem;
    font-size: 0.7rem;
    text-align: center;
    border-radius: 3px;
    font-weight: 600;
    width: calc((100% - 80px) / 24);
}

/* Day Labels - Updated with right align and padding */
.model-heatmap .day-label {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.4rem 0.3rem;
    padding-right: 3px;
    font-weight: 600;
    text-align: right;
    border-radius: 3px;
    width: 80px;
    min-width: 80px;
    white-space: nowrap;
    font-size: 0.8rem;
    vertical-align: middle;
}

/* Heatmap Cells - Fixed sizing and alignment */
.heatmap-cell {
    height: 22px;
    width: auto;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: table-cell !important;
    visibility: visible !important;
    padding: 0;
    margin: 0;
    vertical-align: middle;
    text-align: center;
}

.heatmap-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.current-hour-highlight {
    box-shadow: 0 0 0 2px var(--accent-primary) !important;
    z-index: 10 !important;
    position: relative;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 2px var(--accent-primary); }
    50% { box-shadow: 0 0 0 2px var(--accent-primary), 0 0 10px var(--accent-primary); }
}

/* Updated Heatmap Info */
.heatmap-info {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    min-height: 60px;
    text-align: center;
}

.heatmap-info-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.heatmap-info-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Default heatmap message */
.heatmap-default-message {
    color: var(--text-muted);
    font-style: italic;
}

/* No heatmap data styles */
.no-heatmap-data {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.no-data-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-data-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.no-data-description {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Models Section (Same as index.php) */
.models-section {
    margin-bottom: 3rem;
}

.models-section:not(:last-child) {
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

/* Section Headers - Unified styling */
.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--accent-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* Models Grid (Same as index.php) */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Model Card (Same as index.php) */
.model-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.model-card:hover .model-overlay {
    opacity: 1;
}

.model-card:hover .model-info {
    transform: translateY(0);
}

.model-card > a {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Model Image Wrapper */
.model-image-wrapper {
    position: relative;
    padding-bottom: 133%;
    overflow: hidden;
    background: var(--bg-tertiary);
    margin: 0;
    padding-top: 0;
    top: 0;
}

.model-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    margin: 0;
}

.model-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    margin: 0;
    top: 0;
    left: 0;
}

.model-card:hover .model-image {
    transform: scale(1.05);
}

/* Status Indicator (Same as index.php) */
.model-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 3;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-online .status-dot {
    background: var(--online-indicator);
}

.status-offline .status-dot {
    background: var(--offline-indicator);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Viewers Count (Same as index.php) */
.viewers-count {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    color: var(--text-primary);
}

/* Model Info (Basic) - Same as index.php */
.model-basic-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-height: 125px;
    max-height: 125px;
    overflow: hidden;
}

.model-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    cursor: default;
    user-select: none;
    margin-bottom: 0.25rem;
    height: 1.2em;
}

/* Model Meta Layout - Same as index.php */
.model-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 28px;
    max-height: 28px;
    height: 28px;
    margin-bottom: 0.25rem;
}

.model-meta span {
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* Country Flag Styles */
.country-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.country-flag[src=""] {
    display: none;
}

/* Country and Gender Links - Same as index.php */
.country-link {
    cursor: pointer;
    transition: var(--transition);
    padding: 0.3rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    user-select: none;
    min-width: 32px;
    min-height: 26px;
}

.country-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.gender-link {
    cursor: pointer;
    transition: var(--transition);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
    min-height: 26px;
}

.gender-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Room Subject Styles - Same as index.php */
.model-room-subject {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    min-height: 34px;
    max-height: 34px;
    height: 34px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    margin-top: 0;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.4),
        inset -1px -1px 2px rgba(255, 255, 255, 0.02);
    cursor: default;
    transition: all 0.2s ease;
    user-select: none;
    display: block;
    box-sizing: border-box;
    flex-shrink: 0;
}

.model-room-subject:hover {
    color: var(--text-secondary);
    background: rgba(26, 29, 35, 0.8);
    border-color: rgba(0, 0, 0, 0.4);
}

.model-room-subject:empty {
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.4),
        inset -1px -1px 2px rgba(255, 255, 255, 0.02);
    min-height: 34px;
    max-height: 34px;
    height: 34px;
}

.model-room-subject:empty::before {
    content: "\00a0";
    opacity: 0;
}

/* Model Overlay (Hover Details) - Same as index.php */
.model-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 2;
}

.model-info {
    transform: translateY(10px);
    transition: var(--transition);
}

.model-overlay-name {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    margin-left: -0.25rem;
    margin-right: 0;
    margin-top: 0.25rem;
}

.model-tags .tag-link {
    pointer-events: auto;
    transition: var(--transition);
    flex-shrink: 0;
    margin: 0 0.25rem 0.25rem 0.25rem;
    padding: 0;
    display: inline-flex;
}

.model-tags .tag-link:hover .tag {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.tag {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0;
    vertical-align: middle;
}

/* Mobile model info - Same as index.php */
.model-mobile-info {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    min-height: 60px;
}

.model-mobile-tags {
    display: flex;
    gap: 0.4rem;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.25rem 0;
}

.model-mobile-tags .mobile-tag-link {
    flex-shrink: 0;
}

.model-mobile-tags .tag {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.model-mobile-tags .tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* Responsive adjustments for heatmap */
@media (max-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .day-header,
    .model-heatmap .day-label {
        width: 60px;
        min-width: 60px;
        font-size: 0.75rem;
        padding: 0.3rem 0.2rem;
        padding-right: 3px;
    }
    
    .hour-header {
        font-size: 0.65rem;
        padding: 0.3rem 0.1rem;
        width: calc((100% - 60px) / 24);
    }
    
    .heatmap-cell {
        height: 20px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .info-row {
        grid-template-columns: 150px 1fr;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding-top: 130px;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .sidebar {
        padding: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border: none;
        background: var(--bg-secondary);
        padding-top: 2rem;
        overflow-y: auto;
    }
    
    .sidebar.mobile-active {
        transform: translateX(0);
    }
    
    .model-page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .model-page-title {
        font-size: 2rem !important;
    }
    
    .model-quick-stats {
        flex-wrap: wrap;
        display: none;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }
    
    .info-label {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    /* Mobile heatmap adjustments */
    .heatmap-section {
        padding: 1.5rem;
    }
    
    .day-header,
    .model-heatmap .day-label {
        width: 50px;
        min-width: 50px;
        font-size: 0.7rem;
        padding: 0.25rem 0.1rem;
        padding-right: 3px;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    /* Mobile day abbreviations */
    .model-heatmap .day-label {
        font-size: 0.65rem;
    }
    
    .hour-header {
        font-size: 0.6rem;
        padding: 0.25rem 0.05rem;
        width: calc((100% - 50px) / 24);
    }
    
    .heatmap-cell {
        height: 18px;
    }
    
    .model-heatmap {
        border-spacing: 0.5px;
    }
    
    .heatmap-cell:hover {
        transform: scale(1.1);
    }
    
    /* Mobile: 2 models per row */
    .models-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    /* Mobile adjustments for model cards */
    .model-basic-info {
        padding: 8px;
        min-height: 110px;
        max-height: 110px;
        gap: 0.2rem;
    }
    
    .model-name {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
        height: 1.1em;
    }
    
    .model-room-subject {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        margin-top: 0;
        min-height: 30px;
        max-height: 30px;
        height: 30px;
    }
    
    .model-room-subject:empty {
        min-height: 30px;
        max-height: 30px;
        height: 30px;
    }
    
    /* Hide desktop overlay on mobile */
    .model-overlay {
        display: none !important;
    }
    
    /* Show mobile info on mobile */
    .model-mobile-info {
        display: block !important;
    }
    
    .model-meta {
        gap: 0.4rem;
        min-height: 26px;
        max-height: 26px;
        height: 26px;
        margin-bottom: 0.2rem;
    }
    
    .gender-link, .country-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        min-height: 24px;
    }
    
    .country-link {
        min-width: 30px;
        padding: 0.25rem;
    }
    
    .country-flag {
        width: 18px;
        height: 13px;
    }
}

@media (max-width: 480px) {
    .model-page-title {
        font-size: 1.75rem !important;
    }
    
    .chat-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .model-info-table {
        padding: 1.5rem;
    }
    
    .heatmap-section {
        padding: 1rem;
    }
    
    /* Extra small mobile heatmap adjustments */
    .day-header,
    .model-heatmap .day-label {
        width: 45px;
        min-width: 45px;
        font-size: 0.6rem;
        padding: 0.2rem 0.05rem;
        padding-right: 3px;
    }
    
    .hour-header {
        font-size: 0.55rem;
        padding: 0.2rem 0.02rem;
        width: calc((100% - 45px) / 24);
    }
    
    .heatmap-cell {
        height: 16px;
    }
}

/* Additional fixes for scrollbar issues */
@media (max-width: 1024px) {
    .heatmap-container {
        padding-right: 0;
        margin-right: 0;
    }
    
    .model-heatmap {
        width: 100%;
        max-width: 100%;
    }
}

/* Ensure no horizontal scrollbars on any screen size */
.heatmap-section,
.heatmap-container,
.model-heatmap {
    box-sizing: border-box;
    max-width: 100%;
}

/* Hide scrollbars but keep functionality */
.heatmap-container::-webkit-scrollbar {
    display: none;
}

.heatmap-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}