/* Main Tool Section */
.max-tool-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.max-tool-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

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

/* Input Section */
.input-section {
    padding: 2rem;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.input-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.label-text {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.label-hint {
    font-size: 0.875rem;
    color: #6b7280;
}

.number-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #1f2937;
    flex: 1;
    min-height: 200px;
}

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

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

.input-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-copy,
.btn-copy-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

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

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

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

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

.btn-icon {
    font-size: 1rem;
}

/* Results Section */
.results-section {
    padding: 2rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100%;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 400px;
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    background: #fafafa;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-description {
    font-size: 0.9375rem;
    color: #6b7280;
    max-width: 300px;
    line-height: 1.5;
}

/* Results Content */
.results-content {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

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

.max-result-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 2px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.max-result-header {
    margin-bottom: 1rem;
}

.result-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.max-result-value {
    font-size: 3rem;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
    margin: 0.5rem 0;
    
}

.max-result-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

.meta-divider {
    color: #d1d5db;
    font-size: 1.25rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    
}

/* Numbers Display */
.numbers-display-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.numbers-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
}

.numbers-hint {
    font-size: 0.8125rem;
    color: #6b7280;
}

.numbers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.number-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    
    background: #e5e7eb;
    color: #374151;
    transition: all 0.2s ease;
    cursor: default;
}

.number-badge:hover {
    transform: scale(1.05);
}

.number-badge.max-highlight {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    font-weight: 700;
}

/* Copy Actions */
.copy-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-copy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-copy-secondary {
    background: #ffffff;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-copy-secondary:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .max-tool-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .input-section {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

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

    .empty-state {
        min-height: 300px;
        padding: 2rem 1rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-title {
        font-size: 1.125rem;
    }

    .empty-description {
        font-size: 0.875rem;
    }

    .max-result-value {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .numbers-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-actions,
    .copy-actions {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary,
    .btn-copy,
    .btn-copy-secondary {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .max-tool-card {
        border-radius: 12px;
    }

    .input-section,
    .results-section {
        padding: 1rem;
    }

    .max-result-card {
        padding: 1.5rem;
    }

    .max-result-value {
        font-size: 2rem;
    }

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

    .number-input {
        font-size: 0.9375rem;
    }
}
