* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 60px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

.download-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 50px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

#videoUrl {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    color: #333;
    transition: all 0.3s;
}

#videoUrl:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.btn-primary {
    padding: 18px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.loading-state {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-info {
    padding: 20px 0;
}

.video-preview {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

#videoThumbnail {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.video-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #fff;
}

.video-details p {
    opacity: 0.8;
    font-size: 14px;
}

.quality-selector {
    margin-bottom: 15px;
}

.quality-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

#qualitySelect {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    cursor: pointer;
}

.error-msg {
    padding: 15px 20px;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

.supported-platforms {
    text-align: center;
    margin: 60px 0;
}

.supported-platforms h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.platform-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    transition: all 0.3s;
    cursor: default;
}

.platform-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.platform-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.platform-icon.youtube { background: #FF0000; }
.platform-icon.tiktok { background: #000000; }
.platform-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.platform-icon.facebook { background: #1877F2; }
.platform-icon.twitter { background: #000000; }
.platform-icon.vimeo { background: #1ab7ea; }

.platform-item span {
    display: block;
    font-weight: 600;
    font-size: 16px;
}

footer {
    text-align: center;
    padding: 40px 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .download-card {
        padding: 25px;
    }

    .video-preview {
        flex-direction: column;
        text-align: center;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
