/* tools.css - Específico para las vistas de herramientas, hereda variables de style.css */

.tools-hero {
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    overflow: visible;
}

/* Efecto de Orbes Brillantes Dinámicos */
.tools-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -20%; right: -20%; bottom: -50%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 178, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 80% 40%, rgba(0, 160, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(0, 255, 178, 0.12) 0%, transparent 45%);
    z-index: -1;
    animation: epicPulse 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes epicPulse {
    0% { transform: scale(1) translateY(0); opacity: 0.7; }
    50% { transform: scale(1.05) translateY(20px); opacity: 1; }
    100% { transform: scale(0.95) translateY(-20px); opacity: 0.8; }
}

.tools-directory {
    padding: 20px 0 100px;
    position: relative;
}

/* Efecto de Cuadrícula Tecnológica (Grid Digital) */
.tools-directory::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 178, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 178, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
    z-index: -2;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 80%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 80%, transparent);
}

.tools-directory {
    padding: 20px 0 100px;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 30px;
}

.tool-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 30px;
    text-decoration: none;
    color: var(--text-color, #E2E8F0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    .tool-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
}

/* Efecto hover super visual para las cards */
.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(0, 255, 178, 0.1), transparent);
    transform: skewX(-25deg);
    transition: all 0.7s;
}

.tool-card:hover::before {
    left: 200%;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: #00FFB2;
    box-shadow: 0 20px 40px -10px rgba(0, 255, 178, 0.3);
}

.tool-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 10px rgba(0, 255, 178, 0.1));
}

.tool-icon svg {
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .tool-icon {
        margin-bottom: 20px;
    }
}

.tool-card:hover .tool-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(0, 255, 178, 0.6));
}

.tool-card:hover .tool-icon svg {
    stroke-width: 2.5;
}

.tool-content {
    display: flex;
    flex-direction: column;
}

.tool-content h3 {
    color: #FFFFFF;
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.tool-content p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* UI para la página de herramientas individuales */
.tool-page-container {
    max-width: 900px;
    margin: 100px auto 100px;
    padding: 0 20px;
}

.tool-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.6);
    position: relative;
    z-index: 2;
}

.tool-box-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: white;
}

.tool-box-subtitle {
    text-align: center;
    color: #94A3B8;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #E2E8F0;
    font-weight: 500;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00FFB2;
    box-shadow: 0 0 0 3px rgba(0, 255, 178, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.btn-tool {
    width: 100%;
    background: #00FFB2;
    color: #0F172A;
    border: none;
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-tool:hover {
    background: #00E6A0;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 255, 178, 0.4);
}

.btn-tool:disabled {
    background: #475569;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-box {
    margin-top: 30px;
    display: none;
}

.result-box.active {
    display: block;
    animation: fadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.result-content {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(0, 255, 178, 0.3);
    padding: 20px;
    border-radius: 8px;
    word-break: break-all;
    font-family: monospace;
    font-size: 1.1rem;
    color: #4ADE80;
    text-align: center;
}

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

.btn-secondary {
    background: transparent;
    color: #00FFB2;
    border: 1px solid #00FFB2;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 255, 178, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px -3px rgba(0, 255, 178, 0.2);
}

/* Elementos QR extras */
#qrcode-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin: 30px auto;
    width: fit-content;
}

canvas { max-width: 100%; }

.back-link {
    display: inline-flex;
    align-items: center;
    color: #00FFB2;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

.back-link svg {
    margin-right: 8px;
}

/* -------------------------------------- */
/* Tabs y Componentes de Ruleta Sorteos   */
/* -------------------------------------- */
.tabs-container {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    color: #94A3B8;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.02);
}

.tab-btn.active {
    color: #00FFB2;
    border-bottom-color: #00FFB2;
    background: rgba(0, 255, 178, 0.05);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.4s;
}

/* Animación del ganador */
.winner-showcase {
    margin-top: 40px; 
    padding: 40px; 
    background: rgba(0, 255, 178, 0.05); 
    border-radius: 16px; 
    border: 2px solid #00FFB2;
    box-shadow: inset 0 0 50px rgba(0, 255, 178, 0.1), 0 10px 30px rgba(0, 255, 178, 0.2);
    text-align: center;
}

.winner-showcase h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.winner-value {
    font-size: 3.5rem; 
    color: #00FFB2; 
    font-weight: 800;
    text-shadow: 0 0 20px rgba(0, 255, 178, 0.5);
    background: transparent; 
    border: none; 
}

/* Canvas Ruleta Wrapper */
.roulette-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.roulette-wheel {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 4px solid #1E293B;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: transform cubic-bezier(0.25, 0.1, 0.25, 1) ease-out;
}

.roulette-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 35px solid #00FFB2;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
