/* Mean Calculator Styles */
.mean-calculator-wrapper {
    margin: 0 auto;
}

.calculator-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.calculator-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.input-column {
    display: flex;
    flex-direction: column;
}

.results-column {
    display: flex;
    flex-direction: column;
}

/* Input Section */
.input-section {
    margin-bottom: 0;
}

.input-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

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

.label-hint {
    font-size: 13px;
    color: #6b7280;
}

.input-wrapper {
    position: relative;
}

.numbers-input {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.numbers-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.numbers-input::placeholder {
    color: #9ca3af;
}

.input-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-clear,
.btn-calculate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-clear {
    background: #f3f4f6;
    color: #374151;
}

.btn-clear:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-calculate {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

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

/* Results Section */
.results-section {
    position: sticky;
    top: 24px;
    animation: fadeIn 0.4s ease;
}

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

.results-header {
    margin-bottom: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    animation: fadeIn 0.4s ease;
}

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

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

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

.empty-state-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    text-align: left;
    display: inline-block;
}

.empty-state-list li {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
}

.empty-state-list li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 18px;
}

.empty-state-list code {
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.empty-state-note {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    font-style: italic;
}

.results-content {
    animation: fadeIn 0.4s ease;
}

.results-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.result-card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

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

.result-card.primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.result-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #3b82f6;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-card.primary .result-icon {
    background: #3b82f6;
    color: #ffffff;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    word-break: break-all;
}

.result-card.primary .result-value {
    color: #1e40af;
}

/* Formula Section */
.formula-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

.formula-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formula-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.formula-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.formula-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.formula-numerator,
.formula-denominator {
    font-size: 15px;
    color: #374151;
    padding: 4px 12px;
    background: #ffffff;
    border-radius: 6px;
}

.formula-divider {
    width: 100%;
    height: 2px;
    background: #374151;
    border-radius: 1px;
}

.formula-example {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    color: #991b1b;
    margin-top: 16px;
    animation: shake 0.4s ease;
    width: 100%;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

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

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

/* Info Section */
.info-section {
    margin-top: 32px;
}

.info-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.info-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-list li {
    font-size: 14px;
    color: #374151;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.info-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 600;
}

.info-list code {
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .results-section {
        position: static;
    }

    .empty-state {
        padding: 32px 16px;
    }

    .empty-state-icon {
        font-size: 40px;
    }

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

    .empty-state-description,
    .empty-state-list li {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .calculator-card {
        padding: 20px;
        border-radius: 12px;
    }

    .calculator-grid {
        gap: 20px;
    }

    .numbers-input {
        min-height: 120px;
        padding: 14px;
        font-size: 14px;
    }

    .input-actions {
        flex-direction: column;
    }

    .btn-clear,
    .btn-calculate {
        width: 100%;
        justify-content: center;
    }

    .results-grid {
        gap: 12px;
    }

    .result-card {
        padding: 14px;
    }

    .result-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .result-value {
        font-size: 18px;
    }

    .formula-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .formula-fraction {
        width: 100%;
    }

    .info-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 16px;
    }

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

    .label-hint {
        font-size: 12px;
    }

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

    .result-value {
        font-size: 18px;
    }
}
