:root {
    --bg-color: #0b0d17;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent: #5e6ad2;
    --accent-glow: rgba(94, 106, 210, 0.4);
    --accent-gradient: linear-gradient(135deg, #FF6B6B, #5E6AD2);
    --font-main: 'Inter', sans-serif;
    --radius-lg: 24px;
    --radius-md: 12px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background animated orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    animation: drift 15s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #FF6B6B;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #5E6AD2;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(50px) scale(1.1);
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.dot {
    color: #FF6B6B;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--text-primary);
}

.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 5%;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.converter-box {
    margin-bottom: 4rem;
}

.controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        gap: 1rem;
    }
}

.control-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.custom-select,
.custom-range {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    color: white;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

.custom-select:focus {
    border-color: var(--accent);
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(94, 106, 210, 0.1);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.drop-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.drop-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.results-area {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.result-img-wrapper {
    width: 100%;
    height: 150px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.result-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.result-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compression-badge {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.dl-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--accent);
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: block;
    transition: background 0.3s;
}

.dl-btn:hover {
    background: #4a54b4;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 800px) {
    .features {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }
}

.feature-card {
    padding: 2rem;
    text-align: left;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ad-container {
    max-width: 1000px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--card-border);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer {
    text-align: center;
    padding: 3rem 1rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Loading States */
.loading-card {
    position: relative;
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-text {
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-btn {
    height: 32px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-top: 1rem;
    animation: pulse 1.5s infinite ease-in-out;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-md);
    z-index: 10;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

.loading-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

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