/* ==========================================================================
   universal.css — High-End Premium UI System
   Color Scheme: #332353 (Deep Purple) | #84BD5A (Vibrant Green)
   ========================================================================== */

:root {
    --primary-color: #7991e4;
    --primary-light: #4a3475;
    --primary-gradient: linear-gradient(135deg, #365292 0%, #434698 100%);
    --secondary-color: #7f96e5;
    --secondary-hover: #72a64c;
    --secondary-gradient: linear-gradient(135deg, #7f96e5 0%, #6e85d3 100%);
    --bg-light: #f4f7fa;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --border-color: #dee2e6;
    --shadow-sm: 0 4px 12px rgba(51, 35, 83, 0.05);
    --shadow-md: 0 10px 30px rgba(51, 35, 83, 0.1);
    --shadow-lg: 0 15px 45px rgba(51, 35, 83, 0.15);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Card Styles ---- */
.universal-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(51, 35, 83, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
    transition: var(--transition);
}

.universal-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.universal-card-header {
    background: var(--primary-gradient);
    padding: 24px 30px;
    border-bottom: 5px solid #b8dbff;
    color: #fff;
    font-size: 1.5rem;
}

.universal-card-header h4 {
    color: #ffffff;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.universal-card-body {
    padding: 35px;
}
.universal-card-body p, .universal-card-body span, .universal-card-body li {
   font-size: 16px;
   margin-left: 10px;
}

/* ---- Input Styles ---- */
.universal-label {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.universal-input, 
.universal-select, 
.universal-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-main);
    background-color: #fff;
    transition: var(--transition);
    outline: none;
}

.universal-input:focus, 
.universal-select:focus, 
.universal-textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 5px rgba(132, 189, 90, 0.15);
}

/* ---- Input Group Premium Fixes ---- */
.input-group-premium {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-premium .input-group-text {
    background-color: #f8f9fa;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 800;
    padding: 0 20px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

/* Fix attached borders and radius */
.input-group-premium > :first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-premium > :last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    /*border-left: none !important;*/
}

.input-group-premium > :not(:first-child):not(:last-child) {
    border-radius: 0 !important;
    border-left: none !important;
}

.input-group-premium:focus-within .input-group-text {
    border-color: var(--secondary-color);
    background-color: rgba(132, 189, 90, 0.05);
}

/* ---- Button Styles ---- */
.btn-universal {
    padding: 16px 32px;
    font-weight: 800;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-universal-primary {
    background: var(--secondary-gradient);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(132, 189, 90, 0.3);
}

.btn-universal-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(132, 189, 90, 0.4);
    filter: brightness(1.05);
    color: #ffffff;
}

.btn-universal-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-universal-outline:hover {
    background: #7991e4;
    color: #ffffff;
    transform: translateY(-2px);
}

.universal-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}

.universal-btn-row .btn-universal {
    flex: 1;
    min-width: 160px;
}

.universal-btn-row .btn-universal-outline {
    flex: 0 0 auto;
    min-width: unset;
}

/* Result Box */
.universal-result-box {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 30px;
    border-left: 6px solid var(--secondary-color);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.result-value-large {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--secondary-color);
    letter-spacing: -1px;
    line-height: 1.2;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Content Aesthetics */
.content-section h2 {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.content-list {
    list-style: none;
    padding: 0;
}

.content-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: var(--text-main);
    font-size: 1.05rem;
}

.content-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 900;
}

/* ---- Custom Radio & Checkbox ---- */
.universal-control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.universal-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 700;
    color: var(--text-muted);
}

.universal-control input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.universal-control:hover {
    border-color: var(--secondary-color);
    background: rgba(132, 189, 90, 0.02);
}

.universal-control:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(51, 35, 83, 0.05);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Radio Specific Dot */
.universal-radio-dot {
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
}

.universal-control:has(input:checked) .universal-radio-dot {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.universal-radio-dot::after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.universal-control input:checked ~ .universal-radio-dot::after {
    display: block;
}

