/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #4b4241;
    background-color: #f8f0ed;
}

/* Header section */
.header {
    background-color: #dcc5c0;
    text-align: center;
    padding: 4rem 2rem;
    color: #4b4241;
}

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

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    color: #2c2826;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #866962, transparent);
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #866962;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2rem;
}

/* Profiles section */
.profiles-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.profiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.profile-card {
    position: relative;
    width: 100%;
    max-width: 350px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.4s ease;
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.profile-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.profile-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    cursor: pointer;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.profile-card:hover .profile-image img {
    transform: scale(1.05);
}

.profile-name {
    padding: 1.5rem;
    text-align: center;
    background: #fff;
}

.profile-name h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #4b4241;
    margin: 0;
    font-weight: 400;
}

/* Back link */
.back-link {
    color: #866962;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #4b4241;
}

/* Model detail pages */
.model-detail-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.model-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.model-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card, .rates-card, .description-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.info-card h2, .rates-card h2, .description-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #4b4241;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-item strong {
    color: #866962;
}

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

.rate-item {
    text-align: center;
}

.rate-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #4b4241;
    margin-bottom: 1rem;
    font-weight: 400;
}

.rate-item p {
    font-family: 'Poppins', sans-serif;
    margin: 0.5rem 0;
    color: #4b4241;
}

.deposit-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f0ed;
    border-left: 4px solid #866962;
    border-radius: 4px;
}

.deposit-note p {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    color: #4b4241;
    text-align: center;
}

.description-card p {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #4b4241;
}

.model-gallery h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #4b4241;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-grid .gallery-item {
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease;
    position: relative;
}

.gallery-grid .gallery-item:hover {
    transform: scale(1.02);
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* 视频样式 */
.gallery-grid .gallery-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.gallery-grid .gallery-item .video-overlay {
    position: relative;
    display: block;
    width: 100%;
}

/* 视频播放按钮覆盖层 */
.video-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1); /* 减少暗度 */
    border-radius: 15px;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: 0; /* 默认隐藏 */
}

.video-overlay:hover::before {
    opacity: 1; /* 悬停时显示轻微暗化 */
}

.video-overlay::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-overlay:hover::after {
    opacity: 0.9; /* 悬停时显示 */
    background: rgba(0,0,0,0.8);
}

/* 当视频播放时隐藏播放按钮 */
.video-overlay.playing::before,
.video-overlay.playing::after {
    opacity: 0 !important;
}

/* Loading message */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #866962;
    font-style: italic;
    font-size: 1.1rem;
}

/* Error message */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    font-size: 1.1rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 2rem;
}

/* Responsive design for detail pages */
@media (max-width: 768px) {
    .model-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

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

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid .gallery-item img,
    .gallery-grid .gallery-item video {
        height: 300px;
    }
}

/* Contact section */
.contact-section {
    background-color: #dcc5c0;
    text-align: center;
    padding: 3rem 2rem;
}

.contact-section h2 {
    font-size: 1.75rem;
    color: #4b4241;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-light {
    background-color: #f8f0ed;
    color: #4b4241;
    border: 2px solid #866962;
}

.btn-light:hover {
    background-color: #866962;
    color: #f8f0ed;
}

.btn-dark {
    background-color: #4b4241;
    color: #f8f0ed;
}

.btn-dark:hover {
    background-color: #866962;
}

.btn-whatsapp {
    background-color: #25d366;
    color: #f8f0ed;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
}

/* 媒体查询优化 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.01em;
    }

    .hero-title::after {
        width: 40px;
        bottom: -6px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.3px;
    }

    .profiles-section {
        padding: 2rem 1rem;
    }

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

    .profile-card {
        max-width: 100%;
    }

    .profile-image {
        height: 350px;
    }

    .contact-section {
        padding: 2rem 1rem;
    }

    .btn {
        display: block;
        margin: 0.5rem auto;
        max-width: 200px;
    }

    /* 视频控制优化移动端 */
    .video-overlay::after {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        letter-spacing: 0;
    }

    .hero-title::after {
        width: 30px;
        bottom: -4px;
    }

    .header {
        padding: 2rem 1rem;
    }

    .gallery-grid .gallery-item img,
    .gallery-grid .gallery-item video {
        height: 200px;
    }
}

/* 视频播放优化 */
video {
    outline: none;
}

video::-webkit-media-controls {
    display: flex !important;
}

video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 确保视频在移动设备上正确显示 */
@media (max-width: 768px) {
    video {
        width: 100%;
        height: auto;
        max-height: 250px;
    }
}
