:root {
    /* Light Theme (Default) */
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --danger-color: #ea4335;
    --warning-color: #fbbc05;
    --light-color: #f8f9fa;
    --dark-color: #202124;
    --gray-color: #5f6368;
    --border-color: #dadce0;
    --shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
    --shadow-lg: 0 2px 6px 2px rgba(60, 64, 67, 0.15);

    /* Theme-specific colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #dadce0;
}


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

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

header .container {
    padding-top: 5px;
    padding-bottom: 5px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 44px;
}

.header-left {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right {
    flex: 0 0 auto;
}

.header-search {
    max-width: 500px;
    width: 100%;
}

@media (max-width: 968px) {
    .header-center {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg-primary) !important;
        padding: 12px 20px;
        z-index: 200000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-bottom: 1px solid var(--border-color);
        animation: searchSlideFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .header-center.active {
        display: flex;
    }

    .live-search-results {
        position: fixed !important;
        top: 70px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-height: 60vh !important;
        border-radius: 12px !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: var(--shadow-lg) !important;
        background: var(--card-bg) !important;
        z-index: 200001 !important;
        overflow-y: auto;
    }
}

@keyframes searchModalSlide {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes searchSlideFade {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Estilos del Buscador en Vivo */
.search-wrapper {
    position: relative;
}

.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
}

.live-search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: inherit;
}

.search-result-item:hover {
    background: var(--bg-secondary);
    text-decoration: none !important;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.search-result-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-tertiary);
}

/* Quitar subrayados globalmente */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.btn,
.btn-outline {
    text-decoration: none !important;
}

/* Estilos completos del buscador */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 44px;
    display: flex;
    align-items: center;
}

.search-wrapper>i,
.search-wrapper>i.fa-search,
.header-search>i.fa-search,
.search-wrapper>.fa-search {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--primary-color) !important;
    font-size: 16px !important;
    z-index: 10 !important;
    pointer-events: none !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
}

.search-wrapper input {
    width: 100% !important;
    padding: 0 45px 0 15px !important;
    height: 44px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    border: 1px solid var(--border-color) !important;
    font-size: 14px;
    background: var(--input-bg);
    transition: all 0.2s ease;
    box-shadow: none !important;
    color: var(--text-primary);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

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


.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo i {
    font-size: 28px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.logo span {
    color: var(--primary-color);
}

.google-colors span:nth-child(1) {
    color: #4285f4;
}

.google-colors span:nth-child(2) {
    color: #ea4335;
}

.google-colors span:nth-child(3) {
    color: #fbbc05;
}

.google-colors span:nth-child(4) {
    color: #4285f4;
}

.google-colors span:nth-child(5) {
    color: #34a853;
}

.google-colors span:nth-child(6) {
    color: #ea4335;
}

.main-title {
    text-align: center;
    margin-bottom: 30px;
}

.main-title h2 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.main-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary-color);
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

textarea,
input[type="text"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, background-color 0.3s, color 0.3s;
    background-color: var(--input-bg);
    color: var(--text-primary);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.row {
    display: flex;
    gap: 16px;
}

.col {
    flex: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 44px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn:active {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3);
    transform: translateY(1px);
}

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

.btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #2d9249;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #d33426;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.feature-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.feature-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

footer {
    background-color: var(--footer-bg);
    color: var(--text-secondary);
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.benefit-card {
    text-align: center;
    padding: 30px;
    background: var(--card-bg);
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.animate-fade {
    animation: fadeIn 0.4s ease-out;
}

.delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.notification.success {
    background-color: var(--secondary-color);
    color: white;
}

.notification.error {
    background-color: var(--danger-color);
    color: white;
}

.notification.info {
    background-color: var(--primary-color);
    color: white;
}

.counter {
    margin-left: auto;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.padding-nuevo {
    padding-left: 14px;
    padding-right: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 968px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

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

    .btn {
        width: 100%;
    }

    .counter {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-title h2 {
        font-size: 22px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .card {
        padding: 16px;
    }
}

/* === MOBILE BOTTOM NAVIGATION === */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff !important;
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 100%;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none !important;
    color: var(--text-primary);
    transition: all 0.2s ease;
    height: 100%;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background: rgba(0, 0, 0, 0.03);
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-active i {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    border-radius: 15px;
}

@media (max-width: 968px) {
    .header-right {
        display: none !important;
    }

    .mobile-nav {
        display: block;
    }

    body {
        padding-bottom: 75px !important;
    }

    #scrollTopBtn {
        bottom: 80px !important;
        right: 20px !important;
        z-index: 10000 !important;
    }
}

/* === PREMIUM BADGE === */
.premium-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #000 !important;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.2);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    line-height: 1;
}

.premium-badge i {
    color: #000 !important;
    font-size: 9px;
    margin: 0 -1px 0 0 !important;
    /* Ajuste fino de margen para alineación */
}

.premium-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #000 !important;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.2);
    vertical-align: middle;
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.premium-badge-inline i {
    color: #000 !important;
    font-size: 11px;
}

.feature-card,
.tool-compact-card,
.tabs-grid .tab,
.feature-card-wrapper {
    position: relative !important;
}

/* === PREMIUM TOOL HEADER GLOBAL === */
.tool-header-premium {
    background: #0f172a;
    background: linear-gradient(135deg, var(--tool-header-start, #0f172a) 0%, var(--tool-header-end, #1e293b) 100%);
    padding: 2.5rem;
    border-radius: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-header-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.tool-header-premium .header-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.tool-header-premium .header-icon-box {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tool-header-premium .header-icon-box i,
.tool-header-premium .header-icon-box svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.tool-header-premium .header-info h2 {
    color: #ffffff !important;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tool-header-premium .header-info p {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.tool-header-premium .header-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.tool-header-premium .header-actions .btn-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    padding: 0.75rem 1.25rem;
    border-radius: 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.tool-header-premium .header-actions .btn-header:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.tool-header-premium .header-actions .btn-header.active {
    background: #fbbf24 !important;
    border-color: #fbbf24 !important;
    color: #000000 !important;
}

@media (max-width: 768px) {
    .tool-header-premium {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .tool-header-premium .header-main {
        gap: 1rem;
    }

    .tool-header-premium .header-icon-box {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .tool-header-premium .header-info h2 {
        font-size: 1.4rem;
    }

    .tool-header-premium .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tool-header-premium .header-actions .btn-header {
        justify-content: center;
    }
}