:root {
    --color-bg-card: #1e222d;
    --color-bg-card-hover: #252a37;
    --color-accent-blue: #00f2ff;
    --color-accent-hover: #00d8e4;
    --color-text-light: #ffffff;
    --color-text-secondary: #a0afc0;
    --color-bg-dark: #0a0c10;
}

/* --- Títulos y Logo --- */
.logo {
    background-color: var(--color-bg-card);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto 10px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.logo-icon {
    font-size: 2em;
    color: var(--color-accent-blue);
}

.title {
    font-size: 1.8em;
    margin-bottom: 5px;
    text-align: center;
    color: var(--color-text-light);
}

.subtitle {
    color: var(--color-text-secondary);
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    padding: 0 10px;
}

/* --- Caja del Acortador --- */
.shortener-box {
    display: flex;
    background-color: var(--color-bg-card);
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    gap: 10px;
}

#longUrlInput {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: var(--color-text-light);
    font-size: 1em;
    outline: none;
}

#longUrlInput::placeholder {
    color: var(--color-text-secondary);
}

#shortenButton {
    background-color: var(--color-accent-blue);
    color: #000;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#shortenButton:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* --- TARJETA DE RESULTADO DESTACADO (CORREGIDA) --- */
.result-card {
    background: var(--color-bg-card);
    border: 1px dashed var(--color-accent-blue);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    animation: fadeInSlide 0.4s ease-out;
}

.result-label {
    font-size: 0.9rem;
    color: var(--color-accent-blue);
    margin-bottom: 12px;
    font-weight: bold;
}

.result-main {
    display: flex;
    border: 1px solid rgba(160, 175, 192, 0.3);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    align-items: stretch;
    /* Asegura altura uniforme */
}

#shortenedUrlOutput {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    color: #fff;
    font-size: 1.1em;
    outline: none;
    min-width: 0;
    /* Permite que el input se reduzca en móviles */
    word-break: break-all;
}

.copy-highlight-btn {
    background: var(--color-accent-blue);
    color: #000;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-grow: 0;
    /* No se expande más de lo necesario */
    flex-shrink: 0;
    /* No se comprime */
    white-space: nowrap;
}

/* --- Compartir, Historial y SEO (Resto del código original) --- */
.share-section {
    margin-top: 15px;
}

.share-buttons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.share-btn {
    font-size: 1.5em;
    color: var(--color-text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    transform: scale(1.2);
}

.share-btn.ws:hover {
    color: #25D366;
}

.share-btn.fb:hover {
    color: #1877F2;
}

.share-btn.x:hover {
    color: #fff;
}

.share-btn.tg:hover {
    color: #0088cc;
}

.links-group {
    margin-bottom: 30px;
}

.links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.links-header h2 {
    font-size: 1.3rem;
    color: #fff;
}

.link-item {
    background-color: var(--color-bg-card);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.short-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    /* Fuerza a que no sea más ancho que la tarjeta */
    box-sizing: border-box;
    overflow: hidden;
    /* Evita que el contenido "empuje" hacia afuera */
}

/* .short-link-info { flex: 1; min-width: 0; } */
.short-link-info {
    width: 100%;
    min-width: 0;
}

.short-link {
    color: var(--color-accent-blue);
    font-weight: bold;
    margin: 0;

    display: block;
    width: 100%;
    max-width: 100%;

    white-space: normal;
    word-break: break-all;
}

.long-link {
    font-size: 0.85em;
    color: var(--color-text-secondary);
    margin-top: 5px;

    display: block;
    width: 100%;
    max-width: 100%;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    overflow-wrap: anywhere;
}

.link-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.action-icon {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
}

.clicks-indicator {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    gap: 4px;
}

.section-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 40px 0;
}

.info-seo-container {
    margin-top: 40px;
    text-align: left;
}

.info-text h2 {
    color: var(--color-accent-blue);
    font-size: 1.4rem;
    margin: 25px 0 10px;
}

.info-text p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

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

.benefit-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-card .material-icons {
    color: var(--color-accent-blue);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.benefit-card h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.benefit-card p {
    color: #777;
    font-size: 0.8rem;
    line-height: 1.3;
}

.footer {
    background-color: #07090c;
    padding: 40px 20px;
    margin-top: 80px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
}

.footer-logo span {
    color: var(--color-accent-blue);
}

.footer-section p {
    font-size: 0.8rem;
    color: #666;
}

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

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

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

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: #fff;
    font-size: 1.2rem;
}

/* =========================
   QUICK GUIDES
   ========================= */
.quick-guides {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.quick-guide-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--color-text-light);
    text-decoration: none;
    transition: 0.2s ease;
}

.quick-guide-link:hover {
    border-color: rgba(0, 242, 255, 0.35);
    transform: translateY(-1px);
    color: var(--color-accent-blue);
}

/* =========================
   ✅ NUEVO LAYOUT: Share izquierda vertical + QR derecha
   (Solo afecta al resultContainer)
   ========================= */

/* .result-bottom{
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.06);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
} */


.result-bottom {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);

    /* 🖥️ Desktop */
    display: grid;
    grid-template-columns: 180px max-content;

    align-items: center;
    column-gap: 20px;

    justify-content: center;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}



/* IZQUIERDA: share en vertical */
/* .vertical-share{
    margin-top: 0; 
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
} */
.vertical-share {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 180px;
    /* ✅ igual que la columna */
    text-align: center;
}

.share-label {
    margin: 0 0 10px 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.share-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

/* DERECHA: QR */
/* .qr-right{
    flex: 1;
    margin-top: 0;  
    padding-top: 0; 
    border-top: none; 

    display: flex;
    flex-direction: column;
    align-items: center;
} */

.qr-right {
    margin-top: 0;
    padding-top: 0;
    border-top: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-label {
    color: var(--color-text-secondary);
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}

#qrCodeBox {
    width: 190px;
    height: 190px;
    background: #fff;
    padding: 10px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* Asegura que canvas/img no se deformen */
#qrCodeBox canvas,
#qrCodeBox img {
    width: 170px !important;
    height: 170px !important;
    display: block;
}

#downloadQrBtn {
    margin-top: 12px;
    width: auto;
}

/* ✅ Responsive: en móvil se acomoda bien */
@media (max-width: 600px) {
    .shortener-box {
        flex-direction: column;
    }

    #shortenButton {
        width: 100%;
    }

    .short-link-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .link-actions {
        width: 100%;
        justify-content: space-between;
        padding-top: 10px;
        margin-top: 5px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

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

    /* ✅ Result: apila y share se vuelve horizontal */
    .result-bottom {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: 18px;
    }

    .share-vertical {
        flex-direction: row;
        gap: 20px;
    }

    .vertical-share {
        width: auto;
    }


.qr-right {
    min-width: 210px;
}


}

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

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