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

:root {
    --surface: #131314;
    --surface-container-lowest: #0a0a0b;
    --surface-container: #1a1a1c;
    --on-surface: #f5f5f7;
    --on-surface-variant: #a1a1a6;
    --outline: #6e6e73;
    --primary: #bf5af2;
    --primary-container: #7c4dff;
    --on-primary-container: #fff;
    --tertiary: #64d2ff;
    --background: #000;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--on-surface);
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ==================== UTILITIES ==================== */

.glass-panel {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.text-gradient-ig {
    background: linear-gradient(135deg, #7c4dff 0%, #bf5af2 50%, #ff2d55 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instagram-glow {
    box-shadow: 0 0 60px -20px rgba(124, 77, 255, 0.3), 0 0 40px -20px rgba(191, 90, 242, 0.2);
}

.twilight-button {
    background: linear-gradient(135deg, #7c4dff 0%, #6833ea 100%);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.twilight-button:hover {
    box-shadow: 0 4px 24px rgba(124, 77, 255, 0.4);
    transform: translateY(-1px);
}

.twilight-button:active {
    transform: translateY(0) scale(0.98);
}

/* ==================== ANIMATIONS ==================== */

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

.floating-element {
    animation: float 5s ease-in-out infinite;
}

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

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

/* ==================== PAGE WRAPPER ==================== */

.page-wrapper {
    position: relative;
    min-height: 100vh;
}

.bg-glow-1 {
    position: fixed;
    top: -300px;
    left: 20%;
    width: 600px;
    height: 600px;
    background: rgba(124, 77, 255, 0.08);
    filter: blur(150px);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.bg-glow-2 {
    position: fixed;
    top: 50%;
    right: -150px;
    width: 400px;
    height: 400px;
    background: rgba(100, 210, 255, 0.05);
    filter: blur(120px);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* ==================== HERO SECTION ==================== */

.hero-section {
    padding: 100px 24px 60px;
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

/* Quick Switch */
.quick-switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.quick-switch-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--outline);
    margin-bottom: 12px;
}

.quick-switch-icons {
    display: flex;
    gap: 12px;
}

.platform-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.platform-icon:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
}

.platform-icon i {
    font-size: 16px;
}

/* Brand */
.brand-name {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.brand-name .floating-element {
    display: inline-block;
}

/* Hero Text */
.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: var(--on-surface-variant);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    letter-spacing: 0;
}

/* ==================== SEARCH BOX ==================== */

.search-container {
    max-width: 580px;
    margin: 0 auto 32px;
}

.search-box {
    padding: 6px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    position: relative;
}

.search-box .focus-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(124, 77, 255, 0.06), rgba(100, 210, 255, 0.06));
    border-radius: 100px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.search-box:focus-within .focus-overlay {
    opacity: 1;
}

.search-box:focus-within {
    border-color: rgba(124, 77, 255, 0.3);
}

.search-box .link-icon {
    margin-left: 18px;
    color: var(--outline);
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.url-input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--on-surface);
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.url-input::placeholder {
    color: var(--outline);
}

.paste-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 100px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: var(--on-surface-variant);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 1;
}

.paste-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.paste-btn i {
    font-size: 12px;
}

.download-btn {
    height: 40px;
    padding: 0 24px;
    border-radius: 100px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    margin-right: 3px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.download-btn i {
    font-size: 12px;
}

/* Media Types */
.media-types {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
}

.media-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--outline);
}

.media-type i {
    font-size: 11px;
    opacity: 0.7;
}

/* ==================== LOADING STATE ==================== */

#loading {
    text-align: center;
    padding: 32px 0;
    color: var(--on-surface-variant);
}

#loading .spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(124, 77, 255, 0.15);
    border-top-color: var(--primary-container);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

#loading p {
    font-size: 13px;
    font-weight: 500;
    color: var(--on-surface-variant);
}

/* ==================== RESULTS ==================== */

#result {
    max-width: 440px;
    margin: 0 auto;
}

.error-msg {
    background: rgba(255, 69, 58, 0.08);
    border: 1px solid rgba(255, 69, 58, 0.2);
    color: #ff6961;
    padding: 10px 16px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 12px;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

.error-msg i {
    margin-right: 5px;
    font-size: 11px;
}

.media-card {
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
    animation: fadeInUp 0.4s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-title {
    font-size: 12px;
    color: var(--on-surface-variant);
    font-weight: 500;
    margin-bottom: 12px;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.media-title i {
    font-size: 14px;
    flex-shrink: 0;
    color: var(--primary);
}

.media-item {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

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

.media-preview {
    max-width: 180px;
    max-height: 140px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: cover;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 100px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #7c4dff 0%, #6833ea 100%);
    transition: all 0.2s ease;
}

.dl-btn:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 77, 255, 0.35);
    transform: translateY(-1px);
}

.badge-video {
    background: rgba(100, 210, 255, 0.12);
    color: var(--tertiary);
    padding: 2px 7px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-left: 4px;
}

.badge-photo {
    background: rgba(191, 90, 242, 0.12);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-left: 4px;
}

.badge-audio {
    background: rgba(255, 152, 0, 0.12);
    color: #ff9800;
    padding: 2px 7px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-left: 4px;
}

.dl-btn-audio {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.item-count {
    color: var(--outline);
    font-size: 10px;
    margin-top: 8px;
    font-weight: 500;
}

/* ==================== HOW IT WORKS ==================== */

.how-it-works {
    padding: 60px 24px 80px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-top: 10px;
    margin-bottom: 48px;
    color: var(--on-surface);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.step-card {
    padding: 28px 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.step-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
}

.step-number {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    opacity: 0.7;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.step-card:hover .step-number {
    opacity: 1;
}

.step-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.step-description {
    color: var(--on-surface-variant);
    line-height: 1.6;
    font-size: 13px;
    font-weight: 400;
}

/* ==================== FOOTER ==================== */

.site-footer {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 24px;
    text-align: center;
    background: rgba(10, 10, 11, 0.8);
}

.footer-text {
    font-size: 12px;
    color: var(--outline);
    font-weight: 400;
}

/* ==================== RESPONSIVE - TABLET ==================== */

@media (max-width: 1024px) {
    .hero-section {
        padding: 80px 20px 50px;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 24px;
    }

    .steps-grid {
        gap: 12px;
    }

    .step-card {
        padding: 24px 20px;
    }
}

/* ==================== RESPONSIVE - MOBILE ==================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 70px 16px 40px;
    }

    .hero-title {
        font-size: 30px;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
        max-width: 340px;
    }

    .quick-switch {
        margin-bottom: 24px;
    }

    .quick-switch-icons {
        gap: 10px;
    }

    .platform-icon {
        width: 34px;
        height: 34px;
    }

    .platform-icon i {
        font-size: 14px;
    }

    .brand-name {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .search-container {
        margin-bottom: 24px;
    }

    .search-box {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 10px;
        gap: 6px;
        box-shadow: 0 0 40px -15px rgba(124, 77, 255, 0.25);
    }

    .search-box .link-icon {
        display: none;
    }

    .search-box .focus-overlay {
        border-radius: 20px;
    }

    .url-input {
        width: 100%;
        padding: 10px 14px;
        font-size: 14px;
        order: 1;
        flex-basis: 100%;
    }

    .paste-btn {
        height: 38px;
        padding: 0 14px;
        font-size: 12px;
        order: 2;
        flex: 1;
        justify-content: center;
    }

    .download-btn {
        height: 38px;
        padding: 0 20px;
        font-size: 12px;
        order: 3;
        flex: 1;
        margin-right: 0;
        justify-content: center;
    }

    .media-types {
        gap: 14px;
        flex-wrap: wrap;
    }

    .media-type {
        font-size: 10px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .step-card {
        padding: 22px 20px;
        border-radius: 16px;
    }

    .how-it-works {
        padding: 40px 16px 60px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 32px;
    }

    .bg-glow-1 {
        width: 300px;
        height: 300px;
        opacity: 0.7;
    }

    .bg-glow-2 {
        width: 200px;
        height: 200px;
    }

    .media-card {
        padding: 14px;
        border-radius: 14px;
    }

    .media-preview {
        max-width: 160px;
        max-height: 120px;
        border-radius: 8px;
    }

    .dl-btn {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 9px 16px;
        font-size: 11px;
    }
}

/* ==================== RESPONSIVE - SMALL MOBILE ==================== */

@media (max-width: 420px) {
    .hero-section {
        padding: 56px 14px 32px;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
        max-width: 280px;
    }

    .brand-name {
        font-size: 16px;
    }

    .quick-switch-label {
        font-size: 10px;
    }

    .quick-switch-icons {
        gap: 8px;
    }

    .platform-icon {
        width: 32px;
        height: 32px;
    }

    .platform-icon i {
        font-size: 13px;
    }

    .search-box {
        border-radius: 16px;
        padding: 8px;
    }

    .search-box .focus-overlay {
        border-radius: 16px;
    }

    .paste-btn {
        height: 36px;
        padding: 0 12px;
        font-size: 11px;
        gap: 4px;
    }

    .download-btn {
        height: 36px;
        padding: 0 16px;
        font-size: 11px;
        gap: 4px;
    }

    .url-input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .media-types {
        gap: 10px;
    }

    .media-type {
        font-size: 9px;
        gap: 4px;
    }

    .media-type i {
        font-size: 10px;
    }

    .step-number {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .step-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .step-description {
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 28px;
    }

    .section-label {
        font-size: 10px;
    }

    .media-card {
        padding: 12px;
        border-radius: 12px;
    }

    .media-preview {
        max-width: 140px;
        max-height: 100px;
        border-radius: 6px;
    }

    .dl-btn {
        font-size: 11px;
        padding: 8px 14px;
    }

    .error-msg {
        font-size: 11px;
        padding: 8px 12px;
        border-radius: 8px;
    }

    .site-footer {
        padding: 24px 16px;
    }

    .footer-text {
        font-size: 11px;
    }
}
