/*
 * Styles for TikTok Reelss Page
 */

/* Global TikTok Layout */
.tien_global-tiktok-layout {
    display: flex;
    min-height: 100vh;
    background-color: #000;
    font-family: 'Inter', sans-serif;
}

/* Left Sidebar */
.tien_left-sidebar {
    width: 240px;
    min-width: 240px;
    background-color: #000;
    border-right: 1px solid #2d2d2d;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    z-index: 1000;
}

.tien_left-sidebar::-webkit-scrollbar {
    display: none;
}

.tien_sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #2d2d2d;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.tien_sidebar-logo img {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.tien_sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tien_sidebar-nav li {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0 10px;
    border-radius: 8px;
}

.tien_sidebar-nav li a {
    color: #e0e0e0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tien_sidebar-nav li:hover {
    background-color: #1a1a1a;
}

.tien_sidebar-nav li.active {
    background-color: #252525;
}

.tien_sidebar-nav li.active a {
    color: #fff;
}

.tien_sidebar-section {
    padding: 15px 20px;
    border-bottom: 1px solid #2d2d2d;
    margin-bottom: 15px;
}

.tien_sidebar-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.tien_sidebar-section h3 {
    font-size: 13px;
    color: #888;
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 500;
}

.tien_sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tien_sidebar-section ul li {
    padding: 6px 0;
    font-size: 15px;
}

.tien_sidebar-section ul li a {
    color: #f1f1f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.tien_sidebar-section ul li a:hover {
    color: #fe2c55;
}

.tien_sidebar-section.tien_contact-info p {
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 5px;
}

.tien_sidebar-footer {
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: #555;
    margin-top: auto;
}

.tien_sidebar-footer a {
    color: #555;
    text-decoration: none;
}

.tien_sidebar-footer a:hover {
    text-decoration: underline;
}

/* Main Content Wrapper */
.tien_main-content-wrapper {
    flex-grow: 1;
    background-color: #121212;
    padding: 20px;
    box-sizing: border-box;
}

/* TikTok Profile Container */
.tien_tiktok-profile-container {
    max-width: 980px;
    margin: 0 auto;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Profile Main Section (Header + Nav) */
.tien_profile-main-section {
    background-color: #000;
    padding-top: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Profile Header */
.tien_profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 20px;
    text-align: center;
}

.tien_profile-avatar {
    margin-bottom: 15px;
}

.tien_profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fe2c55;
    box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.3);
}

.tien_profile-info {
    width: 100%;
}

.tien_profile-username {
    font-size: 28px;
    font-weight: 700;
    margin: 5px 0 10px;
    color: #fff;
}

.tien_profile-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.tien_stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tien_stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.tien_stat-label {
    font-size: 13px;
    color: #a0a0a0;
    margin-top: 3px;
}

.tien_profile-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.tien_profile-buttons button {
    background-color: #fe2c55;
    color: #fff;
    border: none;
    padding: 0 25px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 100px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tien_profile-buttons button:hover {
    background-color: #e61d4a;
    transform: translateY(-1px);
}

.message-button {
    background-color: #2f2f2f !important;
    border: 1px solid #484848;
    color: #eee;
}

.message-button:hover {
    background-color: #3f3f3f !important;
}

/* More Options Dropdown */
.tien_more-options-wrapper {
    position: relative;
    display: inline-block;
}

.moreOptionsButton {
    background-color: #2f2f2f !important;
    border: 1px solid #484848;
    color: #eee;
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    padding: 0;
    min-width: 36px;
}

.moreOptionsButton:hover {
    background-color: #3f3f3f !important;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #282828;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    list-style: none;
    padding: 8px;
    margin-top: 8px;
    min-width: 220px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    border: 1px solid #404040;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 500;
    color: #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: block;
    border-radius: 4px;
}

.dropdown-menu li a:hover {
    background-color: #3f3f3f;
    color: #fff;
}


.tien_profile-description {
    font-size: 15px;
    color: #e0e0e0;
    text-align: center;
    margin: 15px 20px 20px;
    line-height: 1.5;
}

/* Profile Navigation */
.tien_profile-nav {
    border-top: 1px solid #2d2d2d;
    border-bottom: 1px solid #2d2d2d;
    background-color: #000;
    margin-top: 15px;
    flex-shrink: 0;
}

.tien_profile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    max-width: 400px;
    justify-content: center;
}

.tien_profile-nav li {
    flex: 1;
    text-align: center;
    font-weight: 600;
    position: relative;
    cursor: pointer;
    color: #a0a0a0;
    transition: color 0.2s ease;
}

.tien_profile-nav li:hover {
    color: #fff;
}

.tien_profile-nav li a {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 14px 5px;
}

.tien_profile-nav li.active {
    color: #fff;
}

.tien_profile-nav li.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background-color: #000;
    flex-grow: 1;
}

.video-item {
    position: relative;
    width: 100%;
    padding-bottom: 177%; /* Aspect ratio for vertical video */
    overflow: hidden;
    background-color: #222;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border-radius: 8px;
}

.video-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 50%);
    z-index: 1;
    opacity: 0.8;
}

.video-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(254, 44, 85, 0.6);
    z-index: 2;
}

.video-item:hover img {
    transform: scale(1.1);
}

.video-stats {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #000;
    padding: 0;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    max-height: 90vh;
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close-button:hover {
    background-color: #fe2c55;
    transform: rotate(90deg);
}

.modal-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 177.77%; /* 9:16 aspect ratio */
    height: 0;
    overflow: hidden;
}

.modal-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px; /* Match modal content */
}

/* Responsive Design */
@media (max-width: 992px) {
    .tien_left-sidebar {
        display: none;
    }
    .tien_main-content-wrapper {
        width: 100%;
        margin: 0 auto;
        padding: 10px;
    }
    .tien_tiktok-profile-container {
        max-width: 100%;
        border-radius: 0;
        min-height: calc(100vh - 20px);
    }
    .tien_profile-main-section {
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .tien_profile-username { font-size: 24px; }
    .tien_profile-stats { gap: 15px; }
    .tien_stat-value { font-size: 16px; }
    .tien_stat-label { font-size: 12px; }
    .tien_profile-buttons button { padding: 0 20px; font-size: 14px; min-width: 80px; }
    .moreOptionsButton { padding: 8px 12px; font-size: 16px; }
    .tien_profile-description { margin: 10px 15px 15px; font-size: 14px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; padding: 10px; }
    .modal-content { max-width: 350px; }
}

@media (max-width: 480px) {
    .tien_profile-avatar img { width: 80px; height: 80px; }
    .tien_profile-username { font-size: 20px; }
    .tien_profile-stats { gap: 10px; }
    .tien_profile-buttons { flex-wrap: wrap; justify-content: center; }
    .tien_profile-buttons button { width: 45%; margin-bottom: 5px; padding: 6px 15px; font-size: 13px; }
    .moreOptionsButton { width: auto; padding: 6px 10px; font-size: 14px; }
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; padding: 5px; }
    .video-stats { font-size: 12px; bottom: 5px; left: 5px; }
    .modal-content { width: 95%; max-width: 100%; }
}
