* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(254, 44, 85, 0.05) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.1) 0%, rgba(37, 244, 238, 0.1) 100%);
    border-radius: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(254, 44, 85, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -2px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
}

main {
    padding: 20px;
}

.mode-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 8px;
    background: rgba(30, 30, 30, 0.6);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    margin: 0 auto 40px;
}

.mode-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}

.mode-btn:hover::before, .mode-btn.active::before {
    width: 300px;
    height: 300px;
}

.mode-btn.active {
    color: #ffffff;
    transform: scale(1.05);
}

.input-section {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    min-width: 250px;
    padding: 18px 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: rgba(18, 18, 18, 0.8);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.input-group input:focus {
    border-color: #fe2c55;
    box-shadow: 0 0 20px rgba(254, 44, 85, 0.3);
    transform: translateY(-2px);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-primary {
    padding: 18px 40px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b9d 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(254, 44, 85, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(254, 44, 85, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fe2c55;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.2) 0%, rgba(255, 0, 0, 0.1) 100%);
    border: 2px solid rgba(254, 44, 85, 0.5);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.user-header {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.15) 0%, rgba(37, 244, 238, 0.15) 100%);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-header img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #fe2c55;
    box-shadow: 0 10px 30px rgba(254, 44, 85, 0.4);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.video-card {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease-out backwards;
}

.video-card:nth-child(1) { animation-delay: 0.05s; }
.video-card:nth-child(2) { animation-delay: 0.1s; }
.video-card:nth-child(3) { animation-delay: 0.15s; }
.video-card:nth-child(4) { animation-delay: 0.2s; }
.video-card:nth-child(5) { animation-delay: 0.25s; }
.video-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(254, 44, 85, 0.3);
    border-color: #fe2c55;
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.1);
}

.video-info-card {
    padding: 20px;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.video-stat {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-download-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #25f4ee 0%, #00d4ff 100%);
    color: #000000;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.video-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 244, 238, 0.4);
}

.video-info {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.5s ease-out;
}

.video-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-item {
    background: rgba(18, 18, 18, 0.6);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.info-value {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        min-width: 100%;
    }
    
    .user-header {
        flex-direction: column;
        text-align: center;
    }
}
