/* Main Tool Wrapper */
.min-tool-wrapper {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

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

.min-tool-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* Input Section */
.input-section {
    padding: 2rem;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.input-header {
    margin-bottom: 1.5rem;
}

.input-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.input-description {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.textarea-container {
    position: relative;
    margin-bottom: 1.25rem;
}

.number-textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #0f172a;
    min-height: 180px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.number-textarea:focus {
    outline: none;
    border-color: #f97316;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.number-textarea::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

.textarea-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.char-count {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:active::before {
    width: 300px;
    height: 300px;
}

.action-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
    transform: translateY(-2px);
}

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

.action-btn-secondary {
    background: #ffffff;
    color: #475569;
    border: 2px solid #cbd5e1;
}

.action-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
}

.btn-svg {
    flex-shrink: 0;
}

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

.results-wrapper {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.min-result-hero {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 2px solid #fed7aa;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.15);
    position: relative;
    overflow: hidden;
}

.min-result-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.min-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.badge-label {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #ffffff;
    color: #ea580c;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.min-value-display {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ea580c;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
    position: relative;
    z-index: 1;
}

.min-metadata {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.metadata-label {
    font-size: 0.8125rem;
    color: #9a3412;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metadata-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ea580c;
}

.metadata-divider {
    width: 1px;
    height: 40px;
    background: #fed7aa;
}

/* Stats Panel */
.stats-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.stats-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

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

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #f97316;
}

.stat-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    filter: grayscale(0.3);
}

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

.stat-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

/* Numbers Panel */
.numbers-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.numbers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.number-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.125rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    background: #ffffff;
    color: #475569;
    border: 2px solid #cbd5e1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.number-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.number-chip:hover::before {
    left: 100%;
}

.number-chip:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.number-chip.min-highlight {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border-color: #c2410c;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    font-weight: 700;
    animation: minPulse 2s ease-in-out infinite;
}

@keyframes minPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 6px 24px rgba(249, 115, 22, 0.6);
    }
}

/* Copy Panel */
.copy-panel {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex: 1;
    justify-content: center;
    min-width: 160px;
}

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

.copy-btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    transform: translateY(-2px);
}

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

.copy-btn-secondary:hover {
    background: #fff7ed;
    color: #ea580c;
    border-color: #ea580c;
    transform: translateY(-2px);
}

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

.empty-icon-wrapper {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.empty-icon {
    color: #94a3b8;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
}

.empty-text {
    font-size: 1rem;
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .min-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 {
        padding: 1.5rem;
    }

    .input-title {
        font-size: 1.25rem;
    }

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

    .number-textarea {
        padding: 1rem;
        font-size: 0.9375rem;
        min-height: 160px;
    }

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

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .results-section {
        padding: 1.5rem;
    }

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

    .min-result-hero {
        padding: 1.75rem 1.5rem;
        border-radius: 14px;
    }

    .min-value-display {
        font-size: 2.75rem;
    }

    .min-metadata {
        flex-direction: column;
        gap: 1rem;
    }

    .metadata-divider {
        width: 60px;
        height: 1px;
    }

    .stats-panel,
    .numbers-panel {
        padding: 1.25rem;
        border-radius: 14px;
    }

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

    .stat-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        font-size: 1.75rem;
    }

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

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

    .numbers-grid {
        padding: 1rem;
        gap: 0.5rem;
    }

    .number-chip {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .copy-panel {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

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

    .empty-text {
        font-size: 0.9375rem;
    }
}

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

    .min-result-hero {
        padding: 1.5rem 1rem;
    }

    .min-value-display {
        font-size: 2.25rem;
    }

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

    .stats-panel,
    .numbers-panel {
        padding: 1rem;
    }

    .empty-state {
        min-height: 250px;
        padding: 1.5rem 1rem;
    }
}
