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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 123, 255, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 8px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: #e0e0e0;
    border: 2px solid #007bff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.downloader-box {
    background: rgba(30, 30, 50, 0.7);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 123, 255, 0.2);
    max-width: 700px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 123, 255, 0.2);
    animation: fadeIn 0.6s ease-out;
}

.downloader-header {
    text-align: center;
    margin-bottom: 2rem;
}

.downloader-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #007bff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tiktok-icon {
    -webkit-text-fill-color: initial;
    font-size: 2.7rem;
    animation: bounce 1.650s infinite;
}

.downloader-header p {
    color: #a0a0a0;
    font-size: 1rem;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.url-input-container {
    position: relative;
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(20, 20, 35, 0.8);
    border: 2px solid rgba(0, 123, 255, 0.3);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.url-input::placeholder {
    color: #666;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    font-size: 1.2rem;
}

.download-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
}

.download-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #003d82);
    transform: translateY(-2px);
    box-shadow: 0 7px 25px rgba(0, 123, 255, 0.5);
}

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

/* Loading State */
.loading {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.loading.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 123, 255, 0.2);
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading p {
    color: #a0a0a0;
}

/* Result Section */
.result-section {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(20, 20, 35, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(0, 123, 255, 0.3);
}

.result-section.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

.video-preview {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.video-thumbnail {
    width: 120px;
    height: 160px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(0, 123, 255, 0.3);
}

.video-info {
    flex: 1;
}

.video-info h3 {
    color: #007bff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.video-info p {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.download-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-option-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border: 2px solid #007bff;
    border-radius: 10px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: block;
}

.download-option-btn:hover {
    background: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(20, 20, 35, 0.6);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 123, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2);
}

.info-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-card h3 {
    color: #007bff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-card p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

/* Message */
.message {
    display: none;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

.message.show {
    display: block;
}

.message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid #28a745;
    color: #28a745;
}

.message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid #dc3545;
    color: #dc3545;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(0, 123, 255, 0.2);
    color: #666;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .downloader-box {
        padding: 2rem;
    }

    .downloader-header h1 {
        font-size: 2rem;
    }

    .url-input-container {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
    }

    .video-preview {
        flex-direction: column;
        text-align: center;
    }
}

/* Particles background */
.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: #007bff;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
    z-index: -1;
}