/* css/contador-de-texto.css */
:root {
    --primary-gradient: linear-gradient(135deg, #2563eb, #1e40af);
    --secondary-gradient: linear-gradient(135deg, #64748b, #475569);
    --success-gradient: linear-gradient(135deg, #22c55e, #16a34a);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tool-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.5s ease-out;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.tool-header h1 {
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-header i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-description {
    color: #64748b;
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.input-section:hover {
    box-shadow: var(--hover-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header label {
    color: #1e40af;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

textarea {
    width: 100%;
    height: 500px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    resize: vertical;
    background: #f8fafc;
}

textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.stat-card i {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stat-info h3 {
    color: #1e40af;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.stat-details p {
    margin: 0.5rem 0;
    color: #64748b;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-details span {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.1rem;
}

.word-frequency-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.word-frequency-section:hover {
    box-shadow: var(--hover-shadow);
}

.word-frequency-section h3 {
    color: #1e40af;
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.frequency-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    min-width: 0;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    cursor: pointer;
}

.search-box input:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
    background: white;
}

.frequency-table-container {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    position: sticky;
    top: 0;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
}

tr:hover td {
    background: #f8fafc;
    color: #1e40af;
}

mark {
    background: #fef08a;
    color: #854d0e;
    padding: 0.1em 0.2em;
    border-radius: 4px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn.secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.copy-notification {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--success-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .frequency-controls {
        grid-template-columns: 1fr;
    }

    .tool-container {
        margin: 1rem;
        padding: 1rem;
    }
}
/* Añadir al css/contador-de-texto.css */
.back-button-container {
    max-width: 1200px;
    margin: 0 auto 1rem auto;
    padding: 0 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.back-button:hover {
    transform: translateX(-5px);
    box-shadow: var(--hover-shadow);
}

.back-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .back-button-container {
        padding: 0 1rem;
    }
    
    .back-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}