* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    min-height: 100vh;
    color: #fff;
}
.hero {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f0f 100%);
    padding: 50px 20px 30px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
h1 { 
    font-size: 1.8em; 
    font-weight: 700; 
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.search-box {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 25px;
    background: #1a1a1a;
    color: #fff;
    font-size: 1em;
    outline: none;
    border: 1px solid #252525;
    transition: all 0.3s ease;
}
.search-box input:focus { 
    border-color: #646cff; 
    box-shadow: 0 0 0 3px rgba(100, 108, 255, 0.1);
}
.search-box input::placeholder { color: #666; }
.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    border: none;
    color: #999;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    font-size: 14px;
    line-height: 24px;
    transition: all 0.2s ease;
}
.clear-btn:hover { background: #444; color: #fff; }
.clear-btn.show { display: block; }
.result-count {
    color: #666;
    font-size: 0.85em;
    margin-top: 10px;
    display: none;
    animation: fadeIn 0.3s ease;
}
.result-count.show { display: block; }

.quick-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.quick-btn {
    padding: 6px 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 15px;
    color: #999;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.quick-btn:hover, .quick-btn.active {
    background: #646cff;
    border-color: #646cff;
    color: #fff;
}

.container { max-width: 1100px; margin: 0 auto; padding: 20px 15px 40px; }
.section { 
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}
.section.hidden { display: none; }
.section-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: #646cff;
    border-radius: 2px;
}
.section-icon {
    font-size: 1.3em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(100, 108, 255, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
    margin-left: 4px;
    transition: all 0.3s ease;
}
.section-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}
.section:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(100, 108, 255, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

.section[data-key="single"] .section-icon {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 142, 83, 0.15) 100%);
}
.section[data-key="single"] .section-icon svg {
    stroke: #ff6b6b;
}
.section[data-key="single"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.25) 0%, rgba(255, 142, 83, 0.25) 100%);
}
.section[data-key="single"] .section-title::before {
    background: linear-gradient(180deg, #ff6b6b 0%, #ff8e53 100%);
}

.section[data-key="tvbox"] .section-icon {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15) 0%, rgba(85, 230, 193, 0.15) 100%);
}
.section[data-key="tvbox"] .section-icon svg {
    stroke: #4ecdc4;
}
.section[data-key="tvbox"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.25) 0%, rgba(85, 230, 193, 0.25) 100%);
}
.section[data-key="tvbox"] .section-title::before {
    background: linear-gradient(180deg, #4ecdc4 0%, #55e6c1 100%);
}

.section[data-key="iptv"] .section-icon {
    background: linear-gradient(135deg, rgba(255, 159, 243, 0.15) 0%, rgba(189, 147, 249, 0.15) 100%);
}
.section[data-key="iptv"] .section-icon svg {
    stroke: #ff9ff3;
}
.section[data-key="iptv"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(255, 159, 243, 0.25) 0%, rgba(189, 147, 249, 0.25) 100%);
}
.section[data-key="iptv"] .section-title::before {
    background: linear-gradient(180deg, #ff9ff3 0%, #bd93f9 100%);
}

.section[data-key="indexjs"] .section-icon {
    background: linear-gradient(135deg, rgba(255, 195, 113, 0.15) 0%, rgba(255, 171, 145, 0.15) 100%);
}
.section[data-key="indexjs"] .section-icon svg {
    stroke: #ffc371;
}
.section[data-key="indexjs"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(255, 195, 113, 0.25) 0%, rgba(255, 171, 145, 0.25) 100%);
}
.section[data-key="indexjs"] .section-title::before {
    background: linear-gradient(180deg, #ffc371 0%, #ffab91 100%);
}

.section[data-key="uz"] .section-icon {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(162, 155, 254, 0.15) 100%);
}
.section[data-key="uz"] .section-icon svg {
    stroke: #6c5ce7;
}
.section[data-key="uz"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.25) 0%, rgba(162, 155, 254, 0.25) 100%);
}
.section[data-key="uz"] .section-title::before {
    background: linear-gradient(180deg, #6c5ce7 0%, #a29bfe 100%);
}

.section[data-key="cinetry"] .section-icon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 152, 0, 0.15) 100%);
}
.section[data-key="cinetry"] .section-icon svg {
    stroke: #ffc107;
}
.section[data-key="cinetry"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.25) 0%, rgba(255, 152, 0, 0.25) 100%);
}
.section[data-key="cinetry"] .section-title::before {
    background: linear-gradient(180deg, #ffc107 0%, #ff9800 100%);
}

.section[data-key="youtube"] .section-icon {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.15) 0%, rgba(244, 67, 54, 0.15) 100%);
}
.section[data-key="youtube"] .section-icon svg {
    stroke: #ff1744;
}
.section[data-key="youtube"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.25) 0%, rgba(244, 67, 54, 0.25) 100%);
}
.section[data-key="youtube"] .section-title::before {
    background: linear-gradient(180deg, #ff1744 0%, #f44336 100%);
}

.section[data-key="mount"] .section-icon {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.15) 0%, rgba(0, 150, 136, 0.15) 100%);
}
.section[data-key="mount"] .section-icon svg {
    stroke: #00bcd4;
}
.section[data-key="mount"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.25) 0%, rgba(0, 150, 136, 0.25) 100%);
}
.section[data-key="mount"] .section-title::before {
    background: linear-gradient(180deg, #00bcd4 0%, #009688 100%);
}

.section[data-key="emby"] .section-icon {
    background: linear-gradient(135deg, rgba(255, 118, 117, 0.15) 0%, rgba(253, 121, 168, 0.15) 100%);
}
.section[data-key="emby"] .section-icon svg {
    stroke: #ff7675;
}
.section[data-key="emby"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(255, 118, 117, 0.25) 0%, rgba(253, 121, 168, 0.25) 100%);
}
.section[data-key="emby"] .section-title::before {
    background: linear-gradient(180deg, #ff7675 0%, #fd79a8 100%);
}

.section[data-key="multi"] .section-icon {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.15) 0%, rgba(130, 204, 221, 0.15) 100%);
}
.section[data-key="multi"] .section-icon svg {
    stroke: #74b9ff;
}
.section[data-key="multi"]:hover .section-icon {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.25) 0%, rgba(130, 204, 221, 0.25) 100%);
}
.section[data-key="multi"] .section-title::before {
    background: linear-gradient(180deg, #74b9ff 0%, #82ccdd 100%);
}

.section-count {
    margin-left: auto;
    font-size: 0.75em;
    color: #666;
    font-weight: 400;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.emby-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}
.emby-card {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.emby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 108, 255, 0.05), transparent);
    transition: left 0.5s ease;
}
.emby-card:hover::before {
    left: 100%;
}
.emby-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.2);
    border-color: #646cff;
    background: #252525;
}
.emby-card-title {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.emby-card-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #ff7675 0%, #fd79a8 100%);
    border-radius: 2px;
}
.emby-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.emby-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
}
.emby-label {
    color: #888;
    min-width: 70px;
    font-weight: 500;
}
.emby-value {
    color: #ddd;
    font-family: 'Courier New', monospace;
    background: #0f0f0f;
    padding: 6px 12px;
    border-radius: 6px;
    flex: 1;
    word-break: break-all;
    border: 1px solid #252525;
    font-size: 0.95em;
}
.emby-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #2a2a2a;
}
.emby-btn {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #999;
}
.emby-btn::before {
    content: '';
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: all 0.2s ease;
}
.emby-btn:hover {
    border-color: #646cff;
    color: #fff;
    background: rgba(100, 108, 255, 0.05);
}
.emby-btn:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646cff' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
}
.emby-btn:active {
    transform: scale(0.98);
}

.item {
    background: #1a1a1a;
    padding: 12px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85em;
    text-align: center;
    border: 1px solid #252525;
    word-break: break-all;
    user-select: none;
    position: relative;
    overflow: hidden;
}
.item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 108, 255, 0.1), transparent);
    transition: left 0.5s ease;
}
.item:hover::before {
    left: 100%;
}
.item:hover { 
    background: #252525; 
    border-color: #646cff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.2);
}
.item:active { 
    transform: scale(0.96) translateY(0); 
}
.item.copied {
    animation: copyPulse 0.6s ease;
}
@keyframes copyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); background: #646cff; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.item.hidden { display: none; }
.item.more-item { display: none; }
.item.download::after {
    content: '↗';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.7em;
    opacity: 0.5;
}

.show-more-btn {
    margin: 15px auto 0;
    padding: 10px 30px;
    background: rgba(100, 108, 255, 0.1);
    border: 1px solid rgba(100, 108, 255, 0.3);
    border-radius: 20px;
    color: #646cff;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    width: fit-content;
}
.show-more-btn.show {
    display: block;
}
.show-more-btn:hover {
    background: rgba(100, 108, 255, 0.2);
    border-color: rgba(100, 108, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.3);
}
.show-more-btn:active {
    transform: translateY(0);
}
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9em;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(100, 108, 255, 0.4);
}
.toast.show { 
    opacity: 1; 
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.no-result {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    display: none;
}
.no-result.show { display: block; }
.footer {
    text-align: center;
    padding: 20px;
    color: #444;
    font-size: 0.8em;
    border-top: 1px solid #1a1a1a;
}
.tip {
    color: #666;
    font-size: 0.75em;
    text-align: center;
    margin-top: 8px;
}

.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.4);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(100, 108, 255, 0.6);
}
.back-to-top:active {
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .hero { padding: 30px 15px 20px; }
    h1 { font-size: 1.5em; margin-bottom: 12px; }
    .search-box input { padding: 12px 18px; font-size: 0.95em; }
    .search-box::before { left: 14px; font-size: 0.9em; }
    .quick-actions { gap: 8px; margin-top: 12px; }
    .quick-btn { padding: 5px 12px; font-size: 0.75em; }
    .container { padding: 15px 12px 30px; }
    .section { margin-bottom: 25px; }
    .section-title { font-size: 1em; margin-bottom: 10px; }
    .section-icon { 
        width: 28px; 
        height: 28px; 
        font-size: 1.1em;
        border-radius: 6px;
    }
    .section-icon svg {
        width: 16px;
        height: 16px;
    }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .emby-cards { grid-template-columns: 1fr; gap: 12px; }
    .emby-card { padding: 16px; border-radius: 8px; }
    .emby-card-title { font-size: 0.95em; margin-bottom: 12px; padding-bottom: 10px; }
    .emby-info-row { font-size: 0.8em; flex-direction: column; align-items: flex-start; gap: 5px; }
    .emby-label { min-width: auto; font-size: 0.9em; }
    .emby-value { width: 100%; font-size: 0.85em; padding: 5px 10px; }
    .emby-actions { margin-top: 12px; padding-top: 12px; }
    .emby-btn { font-size: 0.75em; padding: 7px 12px; }
    .item { padding: 10px 6px; font-size: 0.75em; border-radius: 8px; }
    .item.download::after { top: 2px; right: 4px; font-size: 0.6em; }
    .toast { bottom: 20px; padding: 12px 20px; font-size: 0.85em; }
    .tip { font-size: 0.7em; }
    .back-to-top { 
        width: 40px; 
        height: 40px; 
        bottom: 70px; 
        right: 15px;
        font-size: 18px;
    }
}
@media (max-width: 380px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

.easter-egg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.easter-egg.show {
    opacity: 1;
    visibility: visible;
}

.easter-egg-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f0f 100%);
    border: 1px solid #646cff;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transformation: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(100, 108, 255, 0.3);
}

.easter-egg.show .easter-egg-content {
    transform: translateY(0);
}

.easter-egg-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 24px;
    line-height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.easter-egg-close:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #fff;
    transform: rotate(90deg);
}

.easter-egg h2 {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.easter-egg-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.easter-egg-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.easter-egg-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 108, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.easter-egg-link:hover::before {
    left: 100%;
}

.easter-egg-link:hover {
    border-color: #646cff;
    background: #252525;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(100, 108, 255, 0.2);
}

.easter-egg-icon {
    font-size: 2em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(100, 108, 255, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 10px;
    flex-shrink: 0;
}

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

.easter-egg-title {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.easter-egg-url {
    font-size: 0.85em;
    color: #888;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

@media (max-width: 600px) {
    .easter-egg-content {
        padding: 30px 20px;
        max-width: 90%;
    }

    .easter-egg h2 {
        font-size: 1.3em;
        margin-bottom: 25px;
    }

    .easter-egg-link {
        padding: 14px 16px;
        gap: 12px;
    }

    .easter-egg-icon {
        font-size: 1.6em;
        width: 42px;
        height: 42px;
    }

    .easter-egg-title {
        font-size: 0.95em;
    }

    .easter-egg-url {
        font-size: 0.8em;
    }
}