/* Tool Hero Section - Required by structure rules */
.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);
    }
}

/* Main Generator Styles */
.gaussian-generator-wrapper {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.generator-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: start;
}

.generator-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Input Panel */
.input-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.3s ease;
}

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

.panel-header {
    margin-bottom: 2rem;
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

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

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.label-main {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
}

.label-desc {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
}

.input-container {
    position: relative;
}

.number-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 16px;
    font-weight: 500;
    color: #111827;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.number-input:hover {
    border-color: #d1d5db;
    background: #ffffff;
}

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

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

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-generate,
.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.btn-generate {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    flex: 1;
    min-width: 180px;
}

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

.btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-reset {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-reset:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

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

.btn-text {
    line-height: 1;
}

/* Results Panel */
.results-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    animation: slideIn 0.3s ease-out;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

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

.stat-mean {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
}

.stat-stddev {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}

.stat-count {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    flex-shrink: 0;
}

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

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

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    word-break: break-all;
}

/* Output Section */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.output-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

.btn-copy:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.btn-download:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.action-icon {
    font-size: 16px;
    line-height: 1;
}

.action-text {
    line-height: 1;
}

.output-textarea {
    width: 100%;
    padding: 1rem;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
    line-height: 1.6;
}

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

.output-textarea::placeholder {
    color: #9ca3af;
}

/* Info Sidebar */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
}

.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.info-header {
    margin-bottom: 1rem;
}

.info-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.info-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.info-rule {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.rule-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

.rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule-list li {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
}

.rule-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 700;
}

.rule-list li strong {
    color: #111827;
    font-weight: 600;
}

.use-case-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.use-case-list li {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
}

.use-case-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

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

    .info-sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    .input-panel,
    .results-panel {
        padding: 1.5rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

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

    .btn-generate,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

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

    .output-header {
        flex-direction: column;
        align-items: stretch;
    }

    .output-actions {
        width: 100%;
    }

    .btn-action {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gaussian-generator-wrapper {
        margin-top: 1.5rem;
    }

    .input-panel,
    .results-panel {
        padding: 1.25rem;
        border-radius: 12px;
    }

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

    .panel-subtitle {
        font-size: 13px;
    }

    .number-input {
        padding: 0.625rem 0.875rem;
        font-size: 15px;
    }

    .btn-generate,
    .btn-reset {
        padding: 0.75rem 1.5rem;
        font-size: 15px;
    }
}
