:root {
    /* Colores principales */
    --color-primary: #0A1628;
    --color-accent: #00D4FF;
    --color-secondary: #6366F1;
    --color-bg: #0F172A;
    --color-text: #ffffff;
    --color-text-muted: #cbd5e1;
    /* Mejorado contraste */

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #6366F1 100%);
    --gradient-bg: linear-gradient(135deg, #0A1628 0%, #0F172A 100%);

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Sombras */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Header */
header {
    padding: var(--spacing-md) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 1001;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: var(--color-accent);
    color: white;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding: 2rem 1rem;
        transition: right 0.3s ease;
        flex-direction: column;
        height: calc(100vh - 70px);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links a {
        font-size: 1.1rem;
    }
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    align-items: center;
    /* Centrado vertical */
    justify-content: flex-end;
    /* Justificado a la derecha */
}

.nav-links li {
    display: flex;
    align-items: center;
    /* Asegura que cada item esté centrado verticalmente */
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    /* Centra el contenido del link */
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* CTA Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(0, 212, 255, 0);
    }
}

.hero .btn-primary {
    animation: pulse 2s infinite;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent);
    color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 var(--spacing-xl) 0;
    /* Aumentado padding-top para header fixed */
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

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

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

/* URL Shortener Form */
.shortener-form {
    margin: var(--spacing-xl) 0;
}

.url-input-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.url-input {
    flex: 1;
    padding: 18px 24px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    font-size: 16px;
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.08);
}

.result-box {
    display: none;
    padding: var(--spacing-md);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

.result-box.show {
    display: block;
    animation: slideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.short-url {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.short-url a {
    color: var(--color-accent);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

.copy-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Features Section */
.features {
    padding: 80px 0;
    background: rgba(0, 0, 0, 0.2);
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 60px;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.feature-card {
    text-align: center;
    padding: 40px 30px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.feature-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
    font-size: 1rem;
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.pricing-card {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Altura uniforme */
}

.pricing-card.featured {
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: 'BEST SELLER';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.plan-price span {
    font-size: 1.2rem;
}

.plan-features {
    list-style: none;
    margin: var(--spacing-md) 0;
    text-align: left;
    flex: 1;
    /* Empuja el botón hacia abajo */
}

.plan-features li {
    padding: var(--spacing-xs) 0;
    color: var(--color-text-muted);
}

.plan-features li::before {
    content: '✓ ';
    color: var(--color-accent);
    font-weight: 700;
    margin-right: var(--spacing-xs);
}

/* CTA button anclado al bottom */
.pricing-card a,
.pricing-card .btn {
    margin-top: auto;
    /* Se pega al fondo */
}

/* Comparison Table */
#comparison-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

#comparison-section.show {
    max-height: 2000px;
    padding: 4rem 0;
}

.comparison-table {
    max-width: 1200px;
    margin: 2rem auto 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(0, 212, 255, 0.1);
    font-weight: 700;
    color: #00D4FF;
}

.comparison-table td {
    color: rgba(255, 255, 255, 0.9);
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
}

#toggle-comparison {
    display: block;
    margin: 2rem auto 0;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggle-comparison:hover {
    background: var(--color-accent);
    color: white;
}

/* Footer */
footer {
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xl);
}

.footer-text {
    color: var(--color-text-muted);
}

/* Result Box */
.result-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    display: none;
    text-align: center;
}

.result-box.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Short URL Display - Nuevo diseño */
.short-url-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.short-url-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-accent);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.short-url-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-accent);
}

.short-url-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Copy Button Icon */
.copy-btn-icon {
    padding: 0.875rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 48px;
    min-height: 48px;
}

.copy-btn-icon:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.copy-btn-icon:active {
    transform: scale(0.95);
}

.copy-btn-icon svg {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .short-url-display {
        max-width: 100%;
    }

    .short-url-input {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .copy-btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }
}

/* Alert Messages */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: none;
}

.alert.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Toast Notifications - Floating System */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 450px;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: right;
    color: white;
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 1.25rem;
    line-height: 1;
}

.toast-close:hover {
    opacity: 1;
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
}

.toast-info {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.95), rgba(99, 102, 241, 0.95));
}

.toast-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.95));
}

/* Toast Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100px) scale(0.8);
    }
}

/* Mobile Toast */
@media (max-width: 768px) {
    .toast-container {
        gap: 1rem;
        pointer-events: none;
    }

    .toast {
        min-width: 300px;
        max-width: 450px;
        padding: 1rem 1.25rem;
        border-radius: var(--radius-md);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        gap: 0.75rem;
        pointer-events: auto;
        animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        transform-origin: right;
        color: white;
    }

    .toast.removing {
        animation: slideOutRight 0.3s ease forwards;
    }

    .toast-icon {
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .toast-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .toast-message {
        font-size: 0.95rem;
        font-weight: 500;
    }

    .toast-close {
        background: none;
        border: none;
        color: currentColor;
        cursor: pointer;
        padding: 0.25rem;
        opacity: 0.7;
        transition: opacity 0.2s;
        font-size: 1.25rem;
        line-height: 1;
    }

    .toast-close:hover {
        opacity: 1;
    }

    /* Toast Types */
    .toast-success {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    }

    .toast-error {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    }

    .toast-info {
        background: linear-gradient(135deg, rgba(0, 212, 255, 0.95), rgba(99, 102, 241, 0.95));
    }

    .toast-warning {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.95));
    }

    /* Toast Animations */
    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(100px) scale(0.8);
        }

        to {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
    }

    @keyframes slideOutRight {
        to {
            opacity: 0;
            transform: translateX(100px) scale(0.8);
        }
    }

    /* Mobile Toast */
    @media (max-width: 768px) {
        .toast-container {
            top: 1rem;
            right: 1rem;
            left: 1rem;
            width: auto;
        }

        .toast {
            min-width: auto;
            width: 100%;
        }
    }

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

    /* Responsive */
    @media (max-width: 992px) {
        .features-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .pricing-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .pricing-card.featured {
            transform: scale(1);
        }
    }

    @media (max-width: 768px) {
        .hero h1 {
            font-size: 2.5rem;
        }

        .hero p {
            font-size: 1rem;
        }

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

        .nav-links {
            display: none;
        }

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

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