/* public/assets/css/tools/life/random-number.css */

.rng-workspace {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .rng-workspace {
        grid-template-columns: 1fr;
    }
}

.rng-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.rng-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rng-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rng-form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.rng-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: monospace;
    background: var(--bg-body);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.rng-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb, 0, 102, 204), 0.1);
}

/* Toggle Switch (Apple 风格) */
.rng-toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-body);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.rng-toggle-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.rng-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.rng-switch input { opacity: 0; width: 0; height: 0; }
.rng-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; transition: .4s;
}
.rng-slider:before {
    position: absolute; content: ""; height: 20px; width: 20px;
    left: 4px; bottom: 4px; background-color: white; transition: .4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .rng-slider { background-color: var(--primary-color); }
input:checked + .rng-slider:before { transform: translateX(22px); }
.rng-slider.round { border-radius: 34px; }
.rng-slider.round:before { border-radius: 50%; }

/* Buttons */
.rng-btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 0, 102, 204), 0.3);
}
.rng-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.rng-btn-secondary {
    padding: 8px 16px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.rng-btn-secondary:hover {
    background: rgba(var(--primary-rgb, 0, 102, 204), 0.05);
}

/* Error */
.rng-error-msg {
    margin-bottom: 20px;
    padding: 12px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Result Area */
.rng-res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rng-result-box {
    flex: 1;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 12px;
    overflow-y: auto;
    max-height: 400px;
    font-family: monospace;
}

.rng-empty-state {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 5rem;
}

/* Number Tags */
.rng-num-tag {
    background: var(--bg-surface);
    border: 2px solid rgba(var(--primary-rgb, 0, 102, 204), 0.2);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 8px;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Toast */
.rng-toast {
    position: fixed; top: 24px; left: 50%; transform: translate(-50%, -20px);
    background: #10b981; color: #fff; padding: 12px 24px; border-radius: 50px;
    font-weight: 600; box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    opacity: 0; visibility: hidden; transition: all 0.4s; z-index: 9999;
}
.rng-toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

[data-theme="dark"] .rng-toggle-group { background: #0f172a; }
[data-theme="dark"] .rng-error-msg { background: rgba(220,38,38,0.1); }