:root {
    --primary: #FF0000;
    --primary-dark: #CC0000;
    --secondary: #4285F4;
    --dark: #0F0F0F;
    --darker: #090909;
    --light: #F8F9FA;
    --gray: #606060;
    --success: #28A745;
    --warning: #FFC107;
    --gradient: linear-gradient(135deg, #FF0000, #FF6B6B);
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--darker);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 900;
    text-decoration: none;
    color: white;
    font-family: 'Montserrat', sans-serif;
}

.logo i {
    color: var(--primary);
    font-size: 2rem;
}

.logo .pro {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 900;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--glass);
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: radial-gradient(circle at top right, rgba(255, 0, 0, 0.1), transparent 50%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.highlight {
    color: white;
    font-weight: 900;
}

.subtitle {
    font-size: 1.8rem;
    color: var(--gray);
}

.free {
    color: var(--success);
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat {
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.stat p {
    font-size: 0.9rem;
    color: #aaa;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

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

.floating-card i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.floating-card h3 {
    margin-bottom: 20px;
}

.quality-badge {
    background: var(--gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
}

/* Converter Section */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--gray);
    font-weight: 400;
}

.converter-section {
    padding: 100px 0;
}

.converter-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 30px;
}

.converter-header {
    display: flex;
    align-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gray);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step.active .step-number {
    background: var(--gradient);
}

.step-text {
    font-size: 0.9rem;
    color: #aaa;
}

.step.active .step-text {
    color: white;
    font-weight: 500;
}

.step-line {
    height: 2px;
    background: var(--gray);
    flex: 1;
    margin: 0 20px;
}

.converter-body {
    padding: 40px;
}

.url-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.url-input-group i {
    color: var(--primary);
    font-size: 1.2rem;
}

.url-input-group input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

.url-input-group input::placeholder {
    color: #777;
}

.paste-btn {
    background: var(--glass);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.paste-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.format-selection {
    margin-bottom: 30px;
}

.format-options {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.format-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.format-option:hover {
    border-color: var(--primary);
}

.format-option.active {
    border-color: var(--primary);
    background: rgba(255, 0, 0, 0.1);
}

.format-option i {
    font-size: 2.5rem;
    color: var(--primary);
}

.format-option span {
    font-size: 1.2rem;
    font-weight: 500;
}

.quality-selection h4 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.quality-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quality-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quality-btn.active {
    background: rgba(255, 0, 0, 0.1);
    border-color: var(--primary);
}

.quality-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.quality-btn span {
    font-size: 0.9rem;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.convert-btn {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.convert-btn:hover {
    transform: translateY(-3px);
}

.clear-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Result Section */
.result-section {
    margin-top: 30px;
}

.result-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.progress-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 10px;
    background: var(--gradient);
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #aaa;
}

.result-details {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.response-data {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

.response-data pre {
    color: #aaa;
    font-family: monospace;
    white-space: pre-wrap;
}

/* API Section */
.api-section {
    padding: 100px 0;
    background: rgba(0, 0, 0, 0.5);
}

.api-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.api-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.api-header i {
    font-size: 2rem;
    color: var(--primary);
}

.api-header h3 {
    flex: 1;
}

.api-badge {
    background: var(--success);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.api-content {
    padding: 30px;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.endpoint-method {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: 600;
}

.endpoint-url {
    font-family: monospace;
    color: #aaa;
}

.code-block {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-block pre {
    color: #e83e8c;
    font-family: 'Courier New', monospace;
}

.api-docs-btn {
    width: 100%;
    background: var(--glass);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    transition: background 0.3s ease;
}

.api-docs-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Features Section */
.features-section {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.feature-card h3 {
    margin-bottom: 15px;
}

.feature-card p {
    color: #aaa;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: #aaa;
    margin: 15px 0;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: #aaa;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links-group h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-links-group a {
    display: block;
    color: #aaa;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-links-group a:hover {
    color: var(--primary);
}

.footer-cta h4 {
    margin-bottom: 15px;
}

.footer-cta p {
    color: #aaa;
    margin-bottom: 20px;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.footer-btn:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #777;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-stats { grid-template-columns: repeat(3, 1fr); }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 2.5rem; }
    .hero-stats { grid-template-columns: 1fr; }
    .converter-header { flex-direction: column; gap: 20px; }
    .step-line { display: none; }
    .format-options { flex-direction: column; }
    .action-buttons { flex-direction: column; }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .converter-body { padding: 20px; }
    .url-input-group { flex-direction: column; align-items: stretch; }
    .paste-btn { width: 100%; justify-content: center; }
}

/* Toast Notifications (added dynamically) */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: 'Poppins', sans-serif;
}
.toast-success { background: #28a745; }
.toast-error { background: #dc3545; }
.toast-warning { background: #ffc107; color: #000; }
.toast-info { background: #17a2b8; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
