* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    outline: none !important;
}

*::-webkit-scrollbar {
    display: none;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    color: #fff;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.5;
    z-index: -1;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 100px;
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.bottom-navigation {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.bottom-navigation.nav-hidden {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
}

.bottom-navigation .nav-button {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.bottom-navigation .nav-button.active {
    background: rgba(79, 209, 199, 0.25);
}

.bottom-navigation .nav-button .nav-icon {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.7);
}

.bottom-navigation .nav-button.active .nav-icon {
    color: #4fd1c7;
}

.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.user-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(168,85,247,0.1) 100%);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(168,85,247,0.15);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, transparent 70%);
}

.user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    position: relative;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 16px rgba(168, 237, 234, 0.3);
    position: relative;
}

.avatar svg {
    width: 40px;
    height: 40px;
    fill: #2c3e50;
}

.user-details h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.invite-code-badge {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    margin-left: 12px;
    background: rgba(79, 209, 199, 0.15);
    border: 1px solid rgba(79, 209, 199, 0.3);
    border-radius: 8px;
    color: #4fd1c7;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.invite-code-badge:hover {
    background: rgba(79, 209, 199, 0.25);
    border-color: rgba(79, 209, 199, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 209, 199, 0.3);
}

.invite-code-badge:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(79, 209, 199, 0.2);
}

.user-details p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.expire-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    position: relative;
}

.expire-text {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.expire-days {
    font-size: 15px;
    font-weight: 600;
    color: #4ade80;
}

.expire-days.warning {
    color: #fbbf24;
}

.expire-days.danger {
    color: #f87171;
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22d3ee 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
}

.media-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.card-header-center {
    justify-content: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.media-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.media-stat {
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.media-stat:hover .media-stat-number {
    transform: scale(1.1);
}

.media-stat-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    transition: transform 0.2s;
}

.media-stat-number.movie { color: #f472b6; }
.media-stat-number.series { color: #60a5fa; }
.media-stat-number.playing { color: #4ade80; }
.media-stat-number.device { color: #fbbf24; }

.media-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.action-section {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.ban-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.ban-label {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.ban-value {
    font-size: 14px;
    font-weight: 600;
    color: #f56c6c;
}

.action-btn {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 18px;
    padding: 24px 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(79, 209, 199, 0.3);
}

.action-btn:active,
.action-btn:focus {
    background: rgba(255,255,255,0.05);
    box-shadow: none;
}

.action-btn.highlight {
    background: linear-gradient(135deg, rgba(251,146,60,0.2) 0%, rgba(251,113,133,0.2) 100%);
    border-color: rgba(251,146,60,0.3);
}

.action-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.action-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
}

.bottom-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.announcement-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
}

.announcement-list {
    margin-top: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.announcement-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.announcement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.announcement-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    margin-top: 6px;
    flex-shrink: 0;
}

.announcement-dot.green { background: #4ade80; }
.announcement-dot.yellow { background: #fbbf24; }
.announcement-dot.red { background: #f87171; }

.announcement-content {
    flex: 1;
}

.announcement-title {
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.announcement-time {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.server-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
}

.server-list {
    margin-top: 16px;
}

.server-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.server-item:last-child {
    border-bottom: none;
}

.server-label {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.server-value {
    font-size: 14px;
    color: #4ade80;
    font-weight: 500;
}

.ranking-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 100%;
    overflow: hidden;
}

.ranking-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    min-width: 0;
}

.ranking-list {
    margin-top: 16px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    max-width: 100%;
    overflow: hidden;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.ranking-number.top1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.ranking-number.top2 {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #fff;
}

.ranking-number.top3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 100%);
    color: #fff;
}

.ranking-number.normal {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

.ranking-poster {
    width: 45px;
    height: 65px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-overview {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.display-none {
    display: none !important;
}

.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .top-section {
        grid-template-columns: 1fr;
    }
    .action-section {
        flex-wrap: wrap;
        justify-content: center;
    }
    .action-btn {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
    .action-btn:last-child:nth-child(odd) {
        flex: 0 1 calc(50% - 8px);
    }
    .bottom-section {
        grid-template-columns: 1fr;
    }
    .ranking-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bottom-navigation {
        bottom: 15px;
        padding: 10px;
        gap: 10px;
    }
    .bottom-navigation .nav-button {
        width: 40px;
        height: 40px;
    }
    .bottom-navigation .nav-button .nav-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
        padding-bottom: 100px;
    }
    .user-card, .media-card, .announcement-card, .server-card, .ranking-card {
        padding: 20px;
    }
    .avatar {
        width: 56px;
        height: 56px;
        font-size: 26px;
    }
    .avatar svg {
        width: 30px;
        height: 30px;
    }
    .user-details h2 {
        font-size: 20px;
    }
    .media-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .action-section {
        flex-wrap: wrap;
        justify-content: center;
    }
    .action-btn {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
        padding: 20px 12px;
    }
    .action-btn:last-child:nth-child(odd) {
        flex: 0 1 calc(50% - 8px);
    }
    .action-icon {
        font-size: 28px;
    }
}

.tmdb-search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tmdb-result-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.tmdb-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(76, 175, 80, 0.5);
    transform: translateX(4px);
}

.tmdb-result-poster {
    width: 80px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.tmdb-result-poster[src*="no-poster"] {
    content: '🎬';
}

.tmdb-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.tmdb-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tmdb-result-year {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 4px;
    font-size: 12px;
    color: #4CAF50;
}

.tmdb-result-overview {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tmdb-result-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.tmdb-no-results {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.tmdb-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tmdb-error {
    text-align: center;
    padding: 40px 20px;
    color: #f44336;
}

.tmdb-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.global-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.global-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.global-toast.success {
    background: rgba(16, 185, 129, 0.9);
}

.global-toast.error {
    background: rgba(239, 68, 68, 0.9);
}

.global-toast.info {
    background: rgba(59, 130, 246, 0.9);
}

.global-toast.warning {
    background: rgba(251, 146, 60, 0.9);
}
