/* Tools-specific CSS */

/* Tool Header */
.tool-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.tool-header-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tool-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-free {
    background: var(--success-color);
    color: white;
}

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

.badge-accurate {
    background: var(--accent-color);
    color: white;
}

.tool-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Tool Interface */
.tool-section {
    padding: 3rem 0;
}

.tool-interface {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.test-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-width: 150px;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.metric-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.metric-unit {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Chart Container */
.chart-container {
    margin-bottom: 2rem;
}

.chart-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

#fps-chart {
    width: 100%;
    height: 300px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Stress Test Area */
.stress-test-area {
    margin-top: 2rem;
}

.stress-test-area h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.stress-controls {
    margin-bottom: 1rem;
}

.stress-controls label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stress-controls input[type="range"] {
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
}

.animation-area {
    height: 200px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.animation-element {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: none;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.tool-article {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.tool-article h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tool-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.tool-article p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.tool-article strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1rem;
}

.faq-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Related Tools */
.related-tools {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.related-tools h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    width: 100%;
}

/* Test Results */
.test-results {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.test-results h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.result-label {
    color: var(--text-secondary);
}

.result-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* Performance Indicators */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.performance-excellent {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.performance-good {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-color);
}

.performance-poor {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Tools */
@media (max-width: 768px) {
    .tool-header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tool-title {
        font-size: 2rem;
    }

    .tool-stats {
        justify-content: center;
    }

    .test-controls {
        flex-direction: column;
        align-items: center;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-interface {
        padding: 1.5rem;
    }

    .tool-article {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 2rem;
    }

    .tool-interface {
        padding: 1rem;
    }

    .stress-controls input[type="range"] {
        max-width: 100%;
    }
}

/* Tool-specific animations */
.metric-card.updating .metric-value {
    animation: pulse-value 0.3s ease-in-out;
}

@keyframes pulse-value {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chart-updating {
    animation: chart-glow 2s ease-in-out infinite;
}

@keyframes chart-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); }
}
