/* Living Dolls - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #e94560;
    --text-color: #f1f1f1;
    --card-bg: #0f3460;
    --hover-bg: #1a5490;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
header {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: rgba(241, 241, 241, 0.7);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Video Grid - Landing Page */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.video-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    background: #000;
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Video protection overlay */
.video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

.video-card-name {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(15, 52, 96, 0.8) 100%);
}

/* Profile Page Styles */
.profile-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e94560 0%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.back-link {
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(241, 241, 241, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-color);
}

/* Profile Video Grid */
.profile-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.profile-video-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(233, 69, 96, 0.25);
}

.profile-video-item video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Profile video protection */
.profile-video-item {
    position: relative;
}

.profile-video-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

/* Hide audio/volume controls from videos */
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-mute-button {
    display: none !important;
}

video::-moz-volume-control,
video::-moz-mute-button {
    display: none !important;
}

/* Chat Box Styles */
.chat-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-header {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-align: center;
}

.chat-box {
    background: rgba(22, 33, 62, 0.6);
    border-radius: 8px;
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(241, 241, 241, 0.5);
    font-size: 1.1rem;
    border: 2px dashed rgba(233, 69, 96, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .profile-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .profile-video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .profile-name {
        font-size: 1.75rem;
    }
    
    .back-link {
        font-size: 0.85rem;
    }
    
    .chat-box {
        min-height: 200px;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .header-content,
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .video-card-name {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: rgba(241, 241, 241, 0.7);
}

/* No Videos Message */
.no-videos {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: rgba(241, 241, 241, 0.7);
    background: var(--card-bg);
    border-radius: 12px;
    margin: 2rem 0;
}

/* Accessibility - 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-width: 0;
}

/* Gallery intro */
.gallery-intro {
    text-align: center;
    margin: 2rem 0;
}

.gallery-count {
    font-size: 1.2rem;
    color: rgba(241, 241, 241, 0.9);
    font-weight: 300;
    margin: 0;
}

/* Thumbnail wrapper for index page */
.thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    background: #000;
    overflow: hidden;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Play overlay for thumbnails */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(233, 69, 96, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    padding-left: 6px;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
}

/* Load More Button */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 3rem 0 2rem;
    gap: 1rem;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b9d 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    min-width: 250px;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 69, 96, 0.5);
}

.load-more-btn:active:not(:disabled) {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner p {
    color: rgba(241, 241, 241, 0.8);
    font-size: 1rem;
    margin: 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(233, 69, 96, 0.2);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments for load more button */
@media (max-width: 768px) {
    .load-more-btn {
        padding: 0.875rem 2.5rem;
        font-size: 1rem;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .load-more-btn {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
        min-width: 180px;
    }
}
