/* ==========================================
   KEYWORD RESEARCH TOOL STYLES
========================================== */

/* Seed Keyword Input */
#seedKeyword {
    font-size: 1.125rem;
    font-weight: 500;
}

/* 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 Tabs */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: var(--gray-color);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

/* Keyword Table */
.keyword-table {
    margin-bottom: 0;
}

.keyword-table thead th {
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keyword-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.keyword-table tbody tr {
    transition: var(--transition);
}

.keyword-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

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

/* Volume Badge */
.volume-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
}

.volume-high {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.volume-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.volume-low {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

/* Difficulty Badge */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
}

.difficulty-easy {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.difficulty-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.difficulty-hard {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* CPC Display */
.cpc-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

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

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

/* API Notice */
#apiNotice {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-light);
    color: var(--dark-color);
}

/* 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;
}

/* 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;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }

    .keyword-table {
        font-size: 0.875rem;
    }

    .keyword-table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .keyword-table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .volume-badge,
    .difficulty-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Animation */
@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;
}

/* Keyword Row Animation */
.keyword-table tbody tr {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Tooltip for Keywords */
.keyword-tooltip {
    position: relative;
    cursor: help;
}

.keyword-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--dark-color);
    color: white;
    border-radius: 6px;
    font-size: 0.813rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
}