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

:root {
    --primary: #00B4D8;
    --primary-dark: #0096C7;
    --primary-light: #48D1FF;
    --bg-light: #F8FAFB;
    --bg-secondary: #FFFFFF;
    --text-primary: #0A0E27;
    --text-secondary: #5A6D7B;
    --border-color: #E0E8F0;
    --success: #00A878;
    --warning: #FFB81C;
    --error: #D32F2F;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, #F0F4F8 50%, var(--bg-light) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    opacity: 0;
    animation: fadeInPage 0.8s ease-out 0.3s forwards;
}

/* Page load animation */
@keyframes fadeInPage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(600px at 20% 50%, rgba(0, 180, 216, 0.12) 0%, transparent 80%),
        radial-gradient(600px at 80% 80%, rgba(0, 180, 216, 0.08) 0%, transparent 80%);
    pointer-events: none;
    animation: gradientShift 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin: 60px 0 50px 0;
    animation: slideDown 0.8s ease-out;
}

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

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    animation: float 3s ease-in-out infinite;
}

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

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 10px;
    font-weight: 400;
}

/* Main Card */
.card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 180, 216, 0.08);
    animation: slideUp 0.8s ease-out 0.1s both;
    margin-bottom: 30px;
}

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

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.input-group input {
    flex: 1;
    background: rgba(248, 250, 251, 0.8);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.2);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-dark);
    min-width: 180px;
}

.btn-download:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4);
}

.btn-download:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Options */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.option-btn {
    padding: 12px 16px;
    background: rgba(248, 250, 251, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 100px;
    justify-content: center;
    text-align: center;
}

.option-btn svg {
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
    stroke: currentColor;
}

.option-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 180, 216, 0.05);
}

.option-btn.active {
    background: rgba(0, 180, 216, 0.15);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.option-btn.active svg {
    filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.4));
}

/* Preview */
.preview-section {
    margin-top: 30px;
}

.preview-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
}

.preview-container {
    aspect-ratio: 9 / 16;
    max-width: 300px;
    background: rgba(248, 250, 251, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-container.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
        box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(0, 180, 216, 0);
    }
}

.preview-container video,
.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Audio preview player baru */
.audio-preview-player {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.audio-preview-player audio {
    width: 100%;
    border-radius: 30px;
}

.audio-preview-player .thumb-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 5px;
}

.preview-empty {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
}

/* Download Options */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.download-btn {
    background: rgba(0, 180, 216, 0.1);
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--primary-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn:hover {
    background: rgba(0, 180, 216, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 180, 216, 0.2);
}

.download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* Status Messages */
.status {
    padding: 14px 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    animation: slideUp 0.4s ease-out;
}

.status.show {
    display: block;
}

.status.success {
    background: rgba(0, 168, 120, 0.15);
    border: 1px solid rgba(0, 168, 120, 0.3);
    color: var(--success);
}

.status.error {
    background: rgba(211, 47, 47, 0.15);
    border: 1px solid rgba(211, 47, 47, 0.3);
    color: var(--error);
}

.status.loading {
    background: rgba(0, 180, 216, 0.15);
    border: 1px solid rgba(0, 180, 216, 0.3);
    color: var(--primary-dark);
}

/* Info Section */
.info-section {
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    animation: slideUp 0.8s ease-out 0.2s both;
}

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

.info-item {
    display: flex;
    gap: 15px;
}

.info-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 180, 216, 0.15);
    border-radius: 10px;
}

.info-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-dark);
    fill: none;
}

.info-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.info-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

.footer-text {
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .card {
        padding: 25px;
    }

    .input-group {
        flex-direction: column;
    }

    .btn, .copy-btn {
        width: 100%;
    }

    .options {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .banner-image {
        height: auto;
        font-size: 0.85rem;
    }
}

/* Loading spinner */
.spinner {
    border: 2px solid rgba(0, 180, 216, 0.2);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Banner image styling */
.banner-image {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin-bottom: 30px;
}

.banner-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 180, 216, 0.2);
}

/* Copy button */
.copy-btn {
    background: rgba(0, 180, 216, 0.15);
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.copy-btn:hover {
    background: rgba(0, 180, 216, 0.2);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
  }
