/* Uniform Generator Styles */
.uniform-generator-section {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.generator-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.generator-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem 2rem;
    color: #ffffff;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.card-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.card-body-modern {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label-modern {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.input-modern,
.select-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
}

.input-modern:focus,
.select-modern:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.input-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Radio and Checkbox Styles */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    background-color: #f9fafb;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background-color: #667eea;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background-color: #ffffff;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #667eea;
    background-color: #667eea;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.radio-label,
.checkbox-label {
    font-size: 0.95rem;
    color: #374151;
    user-select: none;
}

/* Button Styles */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
}

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

.btn-secondary-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-modern:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

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

/* Results Section */
.results-container {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease;
}

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

.results-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #e5e7eb;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.results-badge {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.output-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
}

.format-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.format-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.format-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons-small {
    display: flex;
    gap: 0.75rem;
}

.btn-copy,
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
}

.btn-copy:hover {
    background: #f0f9ff;
    border-color: #667eea;
    color: #667eea;
}

.btn-download:hover {
    background: #f0fdf4;
    border-color: #10b981;
    color: #10b981;
}

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

.numbers-display-container {
    padding: 1.5rem 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.numbers-display {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #111827;
    word-break: break-all;
    white-space: pre-wrap;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Statistics Grid */
.stats-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

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

/* Distribution Card */
.distribution-card {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.distribution-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
}

.distribution-content {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.8;
}

.distribution-content div {
    margin-bottom: 0.5rem;
}

.distribution-content strong {
    color: #111827;
    font-weight: 600;
}

/* Histogram */
.histogram-card {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
}

.histogram-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
}

.histogram-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.histogram-display {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 200px;
    padding: 1rem;
    border-bottom: 2px solid #374151;
    border-left: 2px solid #374151;
}

.histogram-bar {
    background: linear-gradient(to top, #667eea, #764ba2);
    min-width: 8px;
    border-radius: 4px 4px 0 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.histogram-bar:hover {
    opacity: 0.8;
}

.histogram-note {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .card-header-modern {
        padding: 1.25rem 1.5rem;
    }

    .card-body-modern {
        padding: 1.5rem;
    }

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

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

    .btn-primary-modern,
    .btn-secondary-modern {
        width: 100%;
        justify-content: center;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 1.5rem;
    }

    .output-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1.5rem;
    }

    .format-selector {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .format-select {
        width: 100%;
    }

    .action-buttons-small {
        width: 100%;
    }

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

    .numbers-display-container {
        padding: 1.25rem 1.5rem;
    }

    .stats-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.25rem 1.5rem;
    }

    .distribution-card,
    .histogram-card {
        padding: 1.25rem 1.5rem;
    }

    .histogram-display {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .stats-grid-modern {
        grid-template-columns: 1fr;
    }

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

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