/* ==========================================
   KEYWORD DENSITY CHECKER STYLES
========================================== */

/* Character Counter */
.char-count {
    float: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-color);
}

/* Content Textarea */
#contentText {
    font-family: 'Courier New', monospace;
    font-size: 0.938rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 300px;
}

/* Statistics Cards */
.stat-card {
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: currentColor;
}

.stat-label {
    font-size: 0.813rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    line-height: 1;
}

/* Keyword Table */
#keywordTable {
    margin-bottom: 0;
}

#keywordTable thead th {
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
}

#keywordTable tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.keyword-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
}

.keyword-text {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.keyword-count {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Density Bar */
.density-bar-container {
    width: 100%;
    height: 24px;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.density-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.density-percentage {
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.density-bar[data-density="low"] {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.density-bar[data-density="medium"] {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.density-bar[data-density="high"] {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* Export Button */
#exportBtn {
    transition: var(--transition);
}

#exportBtn:hover {
    transform: translateY(-2px);
}

/* Practice Cards */
.practice-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    height: 100%;
    transition: var(--transition);
    border: 2px solid transparent;
}

.practice-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.practice-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.practice-icon i {
    font-size: 1.75rem;
}

.practice-card h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.practice-card p {
    font-size: 0.938rem;
    line-height: 1.6;
    margin: 0;
}

/* Phrases Table */
#phrasesTable thead th {
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
}

#phrasesTable tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.phrase-text {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.938rem;
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-color);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    #keywordTable,
    #phrasesTable {
        font-size: 0.875rem;
    }
    
    .keyword-rank {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .density-bar-container {
        height: 20px;
    }
    
    .density-percentage {
        font-size: 0.688rem;
    }
}

/* Animation for results appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#resultsSection .card {
    animation: fadeInUp 0.5s ease;
}

#resultsSection .card:nth-child(2) {
    animation-delay: 0.1s;
}

#resultsSection .card:nth-child(3) {
    animation-delay: 0.2s;
}
