/* Tool Hero Section - Required Styles */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* Correlation Calculator Styles */
.correlation-interface {
    margin: 0 auto;
    margin-bottom: 2rem;
}

.interface-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .interface-container {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

.input-panel,
.results-panel {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 28px;
    transition: all 0.3s ease;
}

.input-panel:hover,
.results-panel:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
}

.panel-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.panel-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Input Method Selector */
.input-method-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 12px;
}

.method-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-btn:hover {
    background: #ffffff;
    color: #1a1a1a;
}

.method-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.method-icon {
    font-size: 18px;
}

.method-label {
    font-size: 14px;
}

/* Input Content */
.input-content {
    position: relative;
    min-height: 200px;
}

.input-method-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.input-method-panel.active {
    display: block;
}

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

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.label-hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 4px;
}

.data-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    resize: vertical;
    transition: all 0.2s ease;
}

.data-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.point-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.point-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table Container */
.table-container {
    margin-top: 16px;
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #ffffff;
    transition: all 0.2s ease;
}

.table-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Settings Group */
.settings-group {
    margin: 24px 0;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f8f9fa;
    color: #1a1a1a;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #d1d5db;
}

.btn-icon {
    font-size: 18px;
}

.btn-text {
    font-size: 15px;
}

/* Error Alert */
.error-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.error-message {
    font-size: 14px;
    font-weight: 500;
}

/* Results Panel */
.results-panel {
    animation: slideIn 0.4s ease;
}

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

.results-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    min-height: 400px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.empty-state-description {
    font-size: 16px;
    color: #6b7280;
    max-width: 500px;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.empty-state-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    max-width: 500px;
}

.empty-state-list li {
    font-size: 14px;
    color: #6b7280;
    padding: 8px 0;
    line-height: 1.6;
}

.empty-state-list li code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #2563eb;
}

@media (max-width: 639px) {
    .empty-state {
        padding: 40px 20px;
        min-height: 300px;
    }

    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }

    .empty-state-title {
        font-size: 20px;
    }

    .empty-state-description {
        font-size: 14px;
    }
}

/* Primary Metrics */
.primary-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .primary-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

.metric-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.metric-card.primary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.metric-symbol {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 8px;
}

.metric-card.primary .metric-value {
    color: #2563eb;
    font-size: 42px;
}

.metric-interpretation {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.metric-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Secondary Metrics */
.secondary-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-item-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-item-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Analysis Section */
.analysis-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analysis-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.analysis-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

/* Strength Indicator */
.strength-indicator {
    margin-bottom: 12px;
}

.strength-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.strength-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.strength-text {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.strength-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* Significance Results */
.significance-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.significance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.significance-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.significance-value {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
}

.significance-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.significance-badge.significant {
    background: #d1fae5;
    color: #065f46;
}

.significance-badge.not-significant {
    background: #fee2e2;
    color: #991b1b;
}

/* Descriptive Stats */
.descriptive-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .descriptive-stats {
        grid-template-columns: 1fr 1fr;
    }
}

.stat-group {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    color: #6b7280;
}

.stat-value {
    font-weight: 600;
    color: #1a1a1a;
}

/* Formula Display */
.formula-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.formula-main {
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.8;
    text-align: center;
}

.formula-details {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 1023px) {
    .interface-container {
        grid-template-columns: 1fr;
    }

    .input-panel,
    .results-panel {
        padding: 20px;
    }

    .panel-title {
        font-size: 20px;
    }

    .metric-value {
        font-size: 32px;
    }

    .metric-card.primary .metric-value {
        font-size: 36px;
    }
}

@media (max-width: 639px) {
    .input-method-selector {
        flex-direction: column;
    }

    .method-btn {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .primary-metrics {
        grid-template-columns: 1fr;
    }

    .secondary-metrics {
        grid-template-columns: 1fr;
    }

    .descriptive-stats {
        grid-template-columns: 1fr;
    }

    .data-textarea {
        min-height: 150px;
        font-size: 13px;
    }

    .table-container {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 12px;
    }
}
