/*
 * Theme Name: MyTik Theme
 * Author: xAI Team
 * Description: A TikTok-style theme for WordPress
 * Version: 1.0
 */

/* Define CSS custom properties (variables) */
:root {
    /* Colors */
    --primary-bg-color: #000;
    --title-color: #fff;
    --text-color: rgba(255, 255, 255, 0.61);
    --button-bg-color: rgba(255, 255, 255, 0.2);
    --button-bg-hover: rgba(255, 255, 255, 0.4);
    --button-bg-followed: #6c757d;
    --overlay-bg-color: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #ff0033, #ff6600);
    --gradient-secondary: linear-gradient(45deg, #ffea00, #ff0099);
    --gradient-neon: linear-gradient(45deg, #6b48ff, #00f7ff);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --shadow-glow: rgba(107, 72, 255, 0.5);

    /* Font sizes */
    --title-font-size-fullscreen: 20px;
    --title-font-size-grid: 14px;
    --text-font-size: 14px;
    --text-font-size-small: 12px;
    --button-font-size-nav: 24px;
    --button-font-size-category: 14px;
    --button-font-size-tab: 16px;
    --button-font-size-tab-tablet: 18px;
    --button-font-size-tab-desktop: 20px;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 10px;
    --spacing-lg: 20px;

    /* Border radius */
    --border-radius-sm: 8px;
    --border-radius-md: 20px;
}

/* Reset and base styles (Mobile First) */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: var(--primary-bg-color);
}

body {
    margin: 0;
}

.site-content {
    padding: 0;
}

/* Main layout (Mobile First) */
.mytik-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mytik-feed::-webkit-scrollbar {
    display: none;
}

.mytik-post {
    position: relative;
    width: 100%;
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Media (Mobile First) */
.mytik-media {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.mytik-media img,
.mytik-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #1a1a1a;
}

.mytik-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}

.mytik-gallery img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mytik-gallery img.active {
    display: block;
}

.gallery-dots {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.gallery-dots span {
    width: 8px; /* Mobile */
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-color);
    margin: 0 6px;
    transition: all 0.3s ease;
}

.gallery-dots span.active {
    background-color: var(--title-color);
    transform: scale(1.3);
    box-shadow: 0 0 6px var(--title-color);
}

/* Overlay (Mobile First) */
.mytik-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.overlay-left {
    position: absolute;
    bottom: 120px;
    left: var(--spacing-lg);
    max-width: 80%;
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateY(var(--spacing-md));
    animation: fadeInUp 0.5s ease forwards 0.3s;
    pointer-events: auto;
    z-index: 6;
}

.overlay-left .author {
    position: absolute;
    bottom: 60px;
    left: 0;
    display: flex;
    align-items: center;
    font-size: 14px; /* Mobile */
    line-height: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px var(--shadow-color);
    text-decoration: none;
    color: var(--title-color);
    pointer-events: auto;
    transition: transform 0.3s ease;
}

.overlay-left .author:hover {
    animation: blink 0.5s infinite alternate;
    transform: scale(1.1);
}

@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

.overlay-left .author-avatar {
    width: 32px; /* Mobile */
    height: 32px;
    align-items: center;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    border: 2px solid #00f7ff;
    object-fit: cover;
}

.overlay-left .author-name {
    text-shadow: 0 2px 4px var(--shadow-color);
    line-height: 24px; /* Mobile */
}

/* Title (Mobile First) */
.overlay-left .title-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.overlay-left .title {
    margin: 0;
    font-size: 16px; /* Mobile */
    line-height: 1.4;
    font-weight: 400;
    text-shadow: 0 2px 4px var(--shadow-color);
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.overlay-left .title.expanded {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: inline-block;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: var(--spacing-sm) 12px;
    border-radius: var(--border-radius-sm);
    color: var(--title-color);
    font-size: 16px; /* Mobile */
    font-weight: 500;
    box-shadow: 0 2px 8px var(--shadow-color);
    max-width: 100%;
    z-index: 7;
}

.explore-grid-title,
.author-grid-title {
    font-size: var(--title-font-size-grid);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px var(--shadow-color);
}

/* Buttons (Mobile First) */
.nav-button {
    display: none; /* Hidden on mobile */
}

.nav-up {
    top: calc(50% - 60px);
}

.nav-down {
    top: calc(50% + 10px);
}

.category-button {
    padding: var(--spacing-sm) 16px;
    background: var(--gradient-primary);
    color: var(--title-color);
    border: none;
    border-radius: var(--border-radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: var(--button-font-size-category);
    cursor: pointer;
    transition: background 0.3s;
}

.category-button:hover {
    background: var(--button-bg-hover);
}

.category-button.active {
    background: var(--title-color);
    color: var(--primary-bg-color);
}

.tab-button {
    background: var(--gradient-primary);
    color: var(--title-color);
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 14px; /* Mobile */
    font-weight: 600;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 0, 51, 0.5);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tab-button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: fire-glow 2.5s linear infinite;
    z-index: 0;
}

.tab-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 0, 51, 0.7);
}

.tab-button span {
    position: relative;
    z-index: 2;
}

.tab-button.active {
    opacity: 1;
    transform: scale(1.05);
    background: linear-gradient(135deg, #ff3300, #cc0000);
    box-shadow: 0 0 0 3px var(--title-color), 0 0 12px 5px rgba(255, 0, 0, 0.6);
    border: 2px solid var(--title-color);
}

.explore-back-button,
.author-back-button {
    position: fixed;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    background: var(--button-bg-color);
    color: var(--title-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.explore-back-button:hover,
.author-back-button:hover {
    background: var(--button-bg-hover);
}

.view-more-btn {
    background: none;
    border: none;
    font-size: var(--text-font-size);
    cursor: pointer;
    display: none;
    padding: 5px; /* Mobile */
    line-height: 1;
    color: transparent;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255, 234, 0, 0.3);
}

.view-more-btn i {
    display: inline-block;
    vertical-align: middle;
}

.control-button {
    background: var(--button-bg-color);
    color: var(--title-color);
    border: none;
    border-radius: 50%;
    width: 30px; /* Mobile */
    height: 30px;
    font-size: 14px; /* Mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-button:hover {
    background: var(--button-bg-hover);
    transform: scale(1.1);
}

.follow-button {
    background: var(--gradient-primary);
    color: var(--title-color);
    border: none;
    padding: var(--spacing-sm) 16px; /* Mobile */
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: var(--text-font-size-small); /* Mobile */
    min-width: 44px; /* Ensure minimum touch size */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
    position: relative;
    z-index: 1;
}

.follow-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 75, 43, 0.4);
}

.follow-button:active {
    animation: bump 0.2s ease-in-out;
}

.follow-button.followed {
    background: var(--button-bg-followed);
    color: var(--title-color);
    box-shadow: none;
    font-weight: 500;
}

.follow-button.followed:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

/* Hashtags (Mobile First) */
.overlay-left .hashtags {
    margin-top: var(--spacing-md);
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-font-size-small); /* Mobile */
    pointer-events: auto;
}

.overlay-left .hashtag {
    text-decoration: none;
    margin-right: var(--spacing-sm);
    pointer-events: auto;
}

.overlay-left .hashtag.category {
    color: var(--text-color);
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(0, 247, 255, 0.3);
    transition: text-shadow 0.3s ease;
}

.overlay-left .hashtag.category:hover {
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.7), 0 0 20px rgba(0, 247, 255, 0.5);
}

.overlay-left .hashtag.tag {
    color: var(--text-color);
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255, 234, 0, 0.3);
    transition: text-shadow 0.3s ease;
}

.overlay-left .hashtag.tag:hover {
    text-shadow: 0 0 10px rgba(255, 234, 0, 0.7), 0 0 20px rgba(255, 234, 0, 0.5);
}

/* Video Player (Mobile First) */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-player {
    position: absolute;
    bottom: 80px;
    left: 1vh;
    right: 10vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    padding: var(--spacing-md) 15px;
    border-radius: var(--border-radius-sm);
    gap: 15px;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--button-bg-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(to right, #ff4e50, #f9d423);
    border-radius: var(--border-radius-sm);
    width: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.2s ease-in-out;
}

.time-display {
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-font-size-small); /* Mobile */
    min-width: 55px;
    text-align: center;
    white-space: nowrap;
}

.video-controls {
    position: absolute;
    bottom: 85px;
    right: 1vh;
    display: flex;
    gap: var(--spacing-md);
    z-index: 10;
}

/* Explore Page (Mobile First) */
#explore-content {
    height: 100vh;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#explore-content::-webkit-scrollbar {
    display: none;
}

.explore-search {
    position: sticky;
    top: 0;
    background: var(--primary-bg-color);
    padding: var(--spacing-md) var(--spacing-lg);
    z-index: 20;
}

#explore-search-input {
    width: 100%;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-font-size);
}

#explore-search-input::placeholder {
    color: var(--text-color);
}

.explore-categories {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    overflow-x: auto;
    background: var(--primary-bg-color);
    position: sticky;
    top: 40px; /* Mobile */
    z-index: 20;
}

.explore-categories::-webkit-scrollbar {
    display: none;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile */
    gap: 2px;
    padding: 2px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.explore-grid-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.explore-grid-item:hover {
    transform: none; /* Mobile: No hover effect */
    filter: none;
}

.explore-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.explore-grid-overlay,
.author-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--overlay-bg-color);
    padding: var(--spacing-md);
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transform: translateY(var(--spacing-md));
    animation: fadeInUp 0.5s ease forwards 0.3s;
}

.post-stats {
    display: flex;
    gap: var(--spacing-md);
    font-size: var(--text-font-size-small);
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 4px var(--shadow-color);
}

.post-stats i {
    margin-right: 5px;
}

.post-type {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-font-size-small);
    text-shadow: 0 2px 4px var(--shadow-color);
}

.video-duration {
    background: var(--overlay-bg-color);
    padding: 2px 5px;
    border-radius: 3px;
}

.gallery-icon i {
    font-size: var(--text-font-size);
}

.explore-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg-color);
    z-index: 30;
}

.explore-fullscreen-posts {
    height: 100%;
}

/* Author Page (Mobile First) */
.author-profile {
    position: relative;
    background: var(--primary-bg-color);
    color: var(--title-color);
    z-index: 10;
}

.author-header-content {
    padding: var(--spacing-lg) 0;
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.author-profile.minimized .author-header-content {
    padding: var(--spacing-md) 0;
}

.author-profile.minimized .author-avatar,
.author-profile.minimized .author-bio,
.author-profile.minimized .author-stats,
.author-profile.minimized .author-social-links {
    display: none;
}

.author-avatar {
    width: 100px; /* Mobile */
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--title-color);
    display: block;
    margin: 0 auto var(--spacing-md);
    object-fit: cover;
}

.author-name {
    margin: var(--spacing-md) 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px; /* Mobile */
    transition: font-size 0.3s ease;
}

.author-profile.minimized .author-name {
    font-size: 16px; /* Mobile */
}

.author-name-follow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.follow-section {
    flex-direction: column; /* Mobile */
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    font-family: 'Poppins', sans-serif;
}

.author-bio {
    margin: 0 0 var(--spacing-md);
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-font-size); /* Mobile */
    color: var(--title-color);
    text-align: center;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0 0 var(--spacing-md);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-weight: 700;
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    font-size: 18px; /* Mobile */
}

.stat-label {
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 12px; /* Mobile */
}

.author-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: -12px;
}

.author-social-links a {
    color: var(--title-color);
    font-size: 20px; /* Mobile */
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.author-social-links a:hover {
    color: #ccc;
    transform: scale(1.2);
}

.author-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    background: var(--title-color);
    position: sticky;
    top: 0;
    z-index: 11;
    transition: padding 0.3s ease;
}

.author-posts {
    overflow-y: auto;
    padding: 0 0 150px;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transition: max-height 0.3s ease;
    max-height: calc(100vh - 25vh); /* Mobile */
}

.author-posts::-webkit-scrollbar {
    display: none;
}

.author-posts.minimized {
    max-height: calc(100vh - 70px); /* Mobile */
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile */
    gap: 2px;
    padding: 2px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.author-grid-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.author-grid-item:hover {
    transform: none; /* Mobile: No hover effect */
    filter: none;
}

.author-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary-bg-color);
    z-index: 30;
    overflow: hidden;
}

.author-fullscreen-posts {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.author-fullscreen-posts::-webkit-scrollbar {
    display: none;
}

.author-fullscreen-posts .mytik-post {
    position: relative;
    width: 100%;
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Like Button (Mobile First) */
.like-button {
    position: absolute;
    bottom: 180px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    z-index: 10;
    opacity: 0;
    transform: translateY(var(--spacing-md));
    animation: fadeInUp 0.5s ease forwards 0.3s;
}

.like-button i {
    font-size: 18px;
    margin-bottom: 5px;
}

.like-button.liked i {
    color: #ff0000;
}

.like-count {
    font-size: var(--text-font-size);
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 4px var(--shadow-color);
}

/* View Count (Mobile First) */
.view-count {
    position: absolute;
    bottom: 120px;
    right: 15px;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform: translateY(var(--spacing-md));
    animation: fadeInUp 0.5s ease forwards 0.3s;
}

.view-count i {
    font-size: 18px;
    margin-bottom: 5px;
}

.view-number {
    font-size: var(--text-font-size);
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 4px var(--shadow-color);
}

/* Header (Mobile First) */
.site-header {
    position: relative;
}

.hamburger-menu {
    position: fixed;
    top: 17px; /* Mobile */
    right: var(--spacing-md);
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-md);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.hamburger-menu i {
    font-size: 32px; /* Mobile */
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: neon-flicker-large 1.5s infinite alternate;
}

@keyframes neon-flicker-large {
    0% { text-shadow: 0 0 15px rgba(0, 247, 255, 0.7), 0 0 30px rgba(0, 247, 255, 0.5); }
    50% { text-shadow: 0 0 15px rgba(0, 247, 255, 0.7), 0 0 30px rgba(0, 247, 255, 0.5), 0 0 50px rgba(0, 247, 255, 0.3); }
    100% { text-shadow: 0 0 15px rgba(0, 247, 255, 0.7); }
}

.hamburger-menu:hover,
.hamburger-menu.active {
    transform: scale(1.2);
}

.hamburger-menu.active {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 80%; /* Mobile */
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.8), rgba(107, 72, 255, 0.3));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
    box-shadow: 0 0 20px var(--shadow-glow);
    animation: breathing-glow 3s infinite ease-in-out;
}

.sidebar.active {
    transform: translateX(0);
    opacity: 1;
}

@keyframes breathing-glow {
    0% { box-shadow: 0 0 20px var(--shadow-glow); }
    50% { box-shadow: 0 0 30px rgba(107, 72, 255, 0.8); }
    100% { box-shadow: 0 0 20px var(--shadow-glow); }
}

.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px; /* Mobile */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.close-sidebar {
    position: absolute;
    left: var(--spacing-lg);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-md);
    transition: transform 0.5s ease, box-shadow 0.3s ease;
}

.close-sidebar i {
    font-size: 20px; /* Mobile */
    color: var(--title-color);
    transition: color 0.3s ease;
}

.close-sidebar:hover {
    transform: rotate(360deg);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.5);
}

.close-sidebar:hover i {
    color: #00f7ff;
}

.logo {
    text-align: center;
}

.logo a {
    font-size: 20px; /* Mobile */
    font-weight: bold;
    text-decoration: none;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0% { text-shadow: 0 0 10px rgba(0, 247, 255, 0.5), 0 0 20px rgba(0, 247, 255, 0.3); }
    50% { text-shadow: 0 0 10px rgba(0, 247, 255, 0.5), 0 0 20px rgba(0, 247, 255, 0.3), 0 0 30px rgba(0, 247, 255, 0.1); }
    100% { text-shadow: 0 0 10px rgba(0, 247, 255, 0.5); }
}

.sidebar-menu-list {
    list-style: none;
    margin: 0;
    padding: var(--spacing-lg);
    overflow: visible;
    z-index: 1;
}

.sidebar-menu-list li {
    margin: 15px 0;
    opacity: 0;
    transform: translateX(var(--spacing-lg));
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    position: relative;
    z-index: 2;
}

.sidebar-menu-list li.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-menu-list li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #e0e0e0;
    font-size: 14px; /* Mobile */
    font-weight: 500;
    padding: var(--spacing-md) 15px;
    border-radius: var(--border-radius-sm);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    z-index: 3;
}

.sidebar-menu-list li a i {
    margin-right: var(--spacing-md);
    font-size: 16px; /* Mobile */
    color: #e0e0e0;
    transition: transform 0.3s ease;
}

.sidebar-menu-list li a:hover i,
.sidebar-menu-list li.current-menu-item a i {
    transform: scale(1.2) translateX(-5px);
}

.sidebar-menu-list li a:hover,
.sidebar-menu-list li.current-menu-item a {
    background: var(--gradient-neon);
    color: var(--title-color);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
}

.sidebar-menu-list li a:hover i,
.sidebar-menu-list li.current-menu-item a i {
    color: var(--title-color);
}

.sidebar-menu-list li a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.sidebar-menu-list li a:hover::before {
    width: 300px;
    height: 300px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.5), rgba(107, 72, 255, 0.2));
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Authors Page (Mobile First) */
.authors-page-wrapper {
    padding: 5px;
    background: var(--primary-bg-color);
    color: var(--title-color);
    min-height: 100vh;
    position: relative;
    overflow-y: auto;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch; /* Improve scrolling on iOS */
}

.authors-page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px; /* Mobile */
    font-weight: 700;
    text-align: center;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    margin-top: 40px;
    margin-bottom: var(--spacing-lg);
    animation: neon-flicker 1.5s infinite alternate;
    position: relative;
    z-index: 10;
}

.authors-page-search {
    position: sticky;
    top: 0;
    background: var(--primary-bg-color);
    padding: var(--spacing-md) 20px;
    z-index: 20;
    margin-bottom: var(--spacing-lg);
}

#authors-page-search-input {
    width: 100%;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--title-color);
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-font-size);
}

#authors-page-search-input::placeholder {
    color: var(--text-color);
}

.authors-page-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile */
    gap: 5px;
    padding: 0px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.authors-page-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 350px;
}

.authors-page-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.9);
}

.authors-page-avatar {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

.authors-page-avatar img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    display: block;
}

.authors-page-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 var(--spacing-md);
}

.authors-page-name {
    margin: 0 0 var(--spacing-sm);
    font-size: 14px; /* Mobile */
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.authors-page-name a {
    color: var(--title-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.authors-page-name a:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.authors-page-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    font-size: 12px; /* Mobile */
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: var(--spacing-md);
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

.stats-row span {
    display: flex;
    align-items: center;
}

.authors-page-stats i {
    margin-right: 5px;
}

/* Load More (Mobile First) - Applies to Index, Explore, Authors */
.load-more,
#load-more,
#load-more-explore {
    text-align: center;
    padding: var(--spacing-lg);
}

.load-more,
#load-more,
#load-more-explore {
    display: flex;
    justify-content: center;
    margin: var(--spacing-lg) 0;
}

.load-more .button,
#load-more .button,
#load-more-explore .button,
#mytik-load-more-authors.button {
    padding: 10px 20px; /* Mobile */
    border: none;
    border-radius: var(--border-radius-md);
    background: var(--gradient-primary);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 14px; /* Mobile */
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
}

.load-more .button:hover,
#load-more .button:hover,
#load-more-explore .button:hover,
#mytik-load-more-authors.button:hover {
    background: var(--gradient-neon);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.7);
}

.load-more .button:active,
#load-more .button:active,
#load-more-explore .button:active,
#mytik-load-more-authors.button:active {
    transform: scale(0.98);
}

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(var(--spacing-md));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fire-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bump {
    0%   { transform: scale(1); }
    50%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Responsive: Adjustments for larger sizes */

/* Max-width: 360px */
@media (max-width: 360px) {
    .overlay-left .title {
        font-size: var(--text-font-size);
    }

    .view-more-btn {
        padding: 5px;
    }
}

/* Min-width: 768px (Tablet) */
@media (min-width: 768px) {
    .nav-button {
        display: flex; /* Show on tablet and up */
        position: fixed;
        right: var(--spacing-lg);
        background: var(--button-bg-color);
        color: var(--title-color);
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: var(--button-font-size-nav);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .control-button {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .gallery-dots span {
        width: 14px;
        height: 14px;
    }

    .time-display {
        font-size: 13px;
    }

    .explore-categories {
        top: 50px;
    }

    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .explore-grid-item:hover {
        transform: scale(1.02);
        filter: brightness(1.1);
    }

    .overlay-left .author {
        font-size: 18px;
    }

    .overlay-left .title {
        font-size: 24px;
    }

    .overlay-left .title.expanded {
        font-size: 24px;
    }

    .overlay-left .hashtags {
        font-size: var(--text-font-size);
    }

    .view-more-btn {
        font-size: var(--text-font-size);
        padding: 5px;
    }

    .author-name {
        font-size: 24px;
    }

    .author-profile.minimized .author-name {
        font-size: 16px;
    }

    .author-bio {
        font-size: var(--text-font-size);
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .author-social-links a {
        font-size: 20px;
    }

    .tab-button {
        font-size: var(--button-font-size-tab-tablet);
    }

    .author-posts {
        max-height: calc(100vh - 30vh);
    }

    .author-posts.minimized {
        max-height: calc(100vh - 75px);
    }

    .author-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .author-grid-item:hover {
        transform: scale(1.02);
        filter: brightness(1.1);
    }

    .follow-button {
        padding: var(--spacing-sm) 20px;
        font-size: var(--button-font-size-tab);
    }
    .sidebar {
        width: 300px;
    }

    /* Authors Page (Tablet) */
    .authors-page-title {
        font-size: 28px;
    }

    .authors-page-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .authors-page-name {
        font-size: 16px;
    }

    .authors-page-stats {
        font-size: 14px;
    }

    .stats-row {
        gap: var(--spacing-lg);
    }

    .load-more .button,
    #load-more .button,
    #load-more-explore .button,
    #mytik-load-more-authors.button {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* Min-width: 1024px (Desktop) */
@media (min-width: 1024px) {
    .overlay-left .author {
        font-size: 18px;
    }

    .overlay-left .title {
        font-size: 24px;
    }

    .overlay-left .title.expanded {
        font-size: 24px;
    }

    .explore-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .author-name {
        font-size: 32px;
    }

    .author-profile.minimized .author-name {
        font-size: 18px;
    }

    .author-bio {
        font-size: 20px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 14px;
    }

    .author-social-links a {
        font-size: 24px;
    }

    .tab-button {
        font-size: var(--button-font-size-tab-desktop);
    }

    .author-posts {
        max-height: calc(100vh - 40vh);
    }

    .author-posts.minimized {
        max-height: calc(100vh - 80px);
    }

    .author-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .author-avatar {
        width: 160px;
        height: 160px;
    }

    .follow-button {
        font-size: var(--button-font-size-tab-tablet);
    }
    .hamburger-menu i {
        font-size: 48px;
    }
    .overlay-left .author-avatar {
        width: 48px; 
        height: 48px;
    }
    .like-button i {
        font-size: 24px;
    }
    .view-count i {
        font-size: 24px;
    }
    
    /* Authors Page (Desktop) */
    .authors-page-title {
        font-size: 32px;
    }

    .authors-page-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .authors-page-name {
        font-size: 18px;
    }

    .authors-page-stats {
        font-size: 16px;
    }

    .load-more .button,
    #load-more .button,
    #load-more-explore .button,
    #mytik-load-more-authors.button {
        padding: 14px 28px;
        font-size: 18px;
    }
}

/* Min-width: 1440px (Large Desktop) */
@media (min-width: 1440px) {
    .explore-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .author-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Authors Page (Large Desktop) */
    .authors-page-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Safe Area Insets */
@supports (padding-top: env(safe-area-inset-top)) {
    .hamburger-menu {
        padding-top: env(safe-area-inset-top);
    }
    .sidebar {
        padding-top: env(safe-area-inset-top);
    }
}