
/* Random Number Generator Tool Styles */

/* Tool Container - Full Page Layout */
.random-number-tool {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    margin: 0;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(34, 33, 33);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-header h1 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.tool-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Generator Interface */
.generator-interface {
    margin-bottom: 2rem;
}

.generator-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Type Selection */
.type-selection {
    margin-bottom: 2rem;
}

.section-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.type-tabs {
    display: flex;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.25rem;
    border-radius: 8px;
}

.type-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-tab:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.type-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.type-tab i {
    font-size: 1rem;
}

/* Configuration Forms */
.config-forms {
    margin-bottom: 2rem;
}

.config-form {
    display: none;
}

.config-form.active {
    display: block;
}

.config-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.config-group {
    display: flex;
    flex-direction: column;
}

.config-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.config-input,
.config-select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.config-input:focus,
.config-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Action Controls */
.action-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.generate-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    justify-content: center;
}

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

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Section */
.result-section {
    margin-top: 2rem;
}

.result-display {
    background: white;
    border-radius: 12px;
    padding: 2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

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

.action-btn {
    padding: 0.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Numbers Grid */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.number-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.number-card:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.number-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.number-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.copy-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* Number Statistics */
.number-stats {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.stats-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Loading, Error, and Success States */
.loading-indicator,
.error-message,
.success-message {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.loading-indicator {
    background: #f3f4f6;
    color: var(--text-light);
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Popular Ranges */
.popular-ranges {
    margin-top: 2rem;
}

.popular-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-title i {
    color: #fbbf24;
}

.ranges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.range-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-item:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.range-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.range-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.range-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }

    .generator-card {
        padding: 1.5rem;
    }

    .config-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    /* Keep type tabs side by side on mobile */
    .type-tabs {
        flex-direction: row;
        gap: 0.25rem;
    }

    .type-tab {
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
    }

    .type-tab span {
        display: block;
    }

    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }

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

    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .result-actions {
        justify-content: center;
    }
}

