body {
    overflow-x: hidden;
}

iframe {
	max-width: unset;
}

.iframecontainer {
	text-align:left; 
	height:800px;
	background-size: 90%;
}

.iframecontainer iframe {
	height: 800px; width:100%; border: none;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width:1700px) and (min-width:1380px) {
	.iframecontainer {
		height:700px;
	}
	.iframecontainer iframe {
		height:700px;
	}
}
@media (max-width:1379px) and (min-width:850px) {
	.iframecontainer {
		height:528px;
	}
	.iframecontainer iframe {
		height:528px;
	}
}
@media (max-width:849px) and (min-width:270px) {
	.iframecontainer {
		width:100%;
		height:100%;
		margin-left: -0.08em;
		-moz-transform-origin:top left;
		-webkit-transform-origin:top left;
		-o-transform-origin:top left;
		-ms-transform-origin:top left;
		transform-origin:top left;
		padding-left:0;
		padding-right:0;
	}
	.iframecontainer iframe {
		height:528px;
		width:800px;
	}
}


.stripcontainer {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 52%;
    overflow: hidden;
}

.stripcontaineroff {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 25%;
}

.stripcontainer iframe, .stripcontaineroff iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.model-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
	margin: 5px auto 1.5em auto;
    align-items: center;
}

.ctabutton {
	background-color: #336699;
    border: 2px solid #336699;
    font-weight: bold;
    letter-spacing: 0.8px;
	padding: 6px 18px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
	background-color:#336699;
	color: #fbfbfb;
	width:300px;
	text-align: center;
	white-space: nowrap;
  overflow: hidden;
	display: inline-block;
}

.ctabutton:hover {
	background-color:orange;
	color: #222222;
    border: 2px solid orange;
}

.ctacontainer {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
	margin: 5px auto 1.5em auto;
    align-items: center;
}

.model-join-notification {
    transition: opacity 0.3s ease;
}


/*------------------------------------------------------------------------------------------------*/


        .model-profile-container {
            /*max-width: 1200px;*/
            width: 100%;
            margin: 0 auto;
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .profile-section {
            flex: 2;
            min-width: 300px;
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        
        .details-section {
            flex: 1;
            min-width: 300px;
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        
        .profile-image {
            float: left;
            /*width: 150px;
            height: 150px;*/
            object-fit: cover;
            border-radius: 8px;
            margin-right: 15px;
            margin-bottom: 10px;
            background-color: #ddd; /* Placeholder color */
        }
        
        .profile-description {
            /* Allow text to wrap around the floated image */
            overflow: visible;
        }
        
        .model-data {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .data-item {
            display: flex;
            flex-direction: row;
            align-items: center;
        }
        
        .data-label {
            font-weight: bold;
            color: #555;
            font-size: 0.9em;
            margin-right: 5px;
            white-space: nowrap;
        }
        
        .data-label::after {
            content: ":";
        }
        
        .data-value {
            font-size: 1.1em;
        }
        
        h2 {
            margin-bottom: 15px;
            color: #333;
        }
        
        /* Mobile view adjustments */
        @media (max-width: 768px) {
            .model-data {
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: space-between;
            }
            
            .data-item {
                width: auto;
                margin-right: 15px;
            }
        }
        
        @media (max-width: 480px) {
            .profile-image {
                width: 100px;
                height: 100px;
            }
        }


/*------------------------------------------- Schedule -------------------------------------------*/

.schedule-section, .room-topic-section {
    margin-top: 1.2em;
    margin-bottom: 1.2em;
    min-width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.model-schedule {
  overflow-x: auto;
  padding: 10px;
  font-family: sans-serif;
}

.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: fit-content;
}

.grid-row {
  display: grid;
  grid-template-columns: 60px repeat(24, 40px); /* 60px for day label, 40px for each hour */
  gap: 4px;
  align-items: center;
}

.grid-row.header {
  font-weight: bold;
  font-size: 12px;
  text-align: center;
}

.day-label {
  font-weight: bold;
  font-size: 13px;
  padding-right: 5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hour-label,
.hour-block {
  text-align: center;
  padding: 4px;
  border-radius: 4px;
  font-size: 11px;
  box-sizing: border-box;
  min-width: 40px;
  max-width: 40px;
  height: 22px;
  line-height: 20px;
}

.hour-block {
  background: #eee;
  cursor: default;
}

.model-schedule {
  position: relative;
}
.model-schedule::after {
  content: '←  →';
  font-size: 12px;
  color: #666;
  position: absolute;
  bottom: 0;
  right: 10px;
}


/*-------------------------------------------- Main Grid ------------------------------------------*/

.models-grid-heading{
    margin-top: 2em;
    text-align: center;
}

/* Models Grid Container */
.models-grid-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    /*padding: 20px 15px;*/
}

/* Header Section */
.models-header {
    margin-bottom: 25px;
    text-align: center;
}

.models-grid-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

/* Statistics */
.models-stats {
    font-size: 14px;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stat-item {
    display: inline-flex;
    align-items: center;
}

.stat-item strong {
    color: #333;
    font-weight: 600;
    margin-right: 4px;
}

.stat-separator {
    color: #ccc;
}

.last-updated {
    color: #999;
}

#update-time {
    font-weight: 600;
    color: #666;
}

/* Grid Layout */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin: 0 auto;
}

/* Model Card */
.model-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.model-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail Container */
.model-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.model-thumbnail img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

/* Handle portrait images */
.model-thumbnail img[src*="portrait"],
.model-thumbnail img.portrait-mode {
    width: auto;
    height: 100%;
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.1);
}

.model-card:hover .model-thumbnail img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Live Badge */
.live-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: green;
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    line-height: 1;
    opacity: 0.8;
}

/* Platform Badge - Bottom right of thumbnail with opacity */
.platform-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.model-card:hover .platform-badge {
    opacity: 1;
}

.platform-icon {
    width: 18px;
    height: 18px;
}

.model-card[data-platform="chaturbate"] .platform-icon {
    color: #ff6b00;
}

.model-card[data-platform="stripchat"] .platform-icon {
    color: #ff1744;
}

/* Model Info */
.model-info {
    padding: 12px;
    position: relative;
}

.model-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 60px; /* Space for viewer count */
}

.model-topic {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Viewer Count - Bottom right of card */
.viewer-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #f0f0f0;
    color: #333;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    display: none;
}

.viewer-icon {
    width: 14px;
    height: 14px;
    color: #666;
}

/* Load More Button */
.load-more-container {
    margin-top: 30px;
    text-align: center;
}

.load-more-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.load-more-btn:hover {
    background: #555;
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn.loading {
    position: relative;
    color: transparent;
}

.load-more-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #333;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Large screens */
@media (min-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Tablet */
@media (max-width: 768px) {
    .models-header {
        margin-bottom: 20px;
    }
    
    .models-grid-title {
        font-size: 20px;
    }
    
    .models-stats {
        font-size: 12px;
        gap: 6px;
    }
    
    .stat-separator {
        display: none;
    }
    
    .stat-item {
        width: 100%;
        justify-content: center;
        margin: 2px 0;
    }
    
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .model-info {
        padding: 8px;
    }
    
    .model-name {
        font-size: 14px;
        padding-right: 50px;
    }
    
    .viewer-count {
        bottom: 8px;
        right: 8px;
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}

/* Loading State */
.models-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}


/**/


.loader {
      border: 6px solid #f3f3f3;
      border-top: 6px solid red;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin: auto;
      position: absolute;
    top: 130px;
    left: 175px;
    z-index: -1;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }


#header.header-tall:not(.affix) .logo {
    padding-top: 0.9em !important;
    padding-bottom: 0.9em !important;
}

/* ============================================ Admin ============================================*/

#dataeditor_filter {
    max-width: 300px;
    margin: 20px 0;
}

#dataeditor_filter * {
    margin: 5px 0;
}