@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-color: rgba(0, 150, 255, 0.8);
    --primary-glow: rgba(0, 150, 255, 0.5);
    --glass-bg: rgba(20, 20, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #e3e3e3;
    --text-muted: #a0a0a0;
    --body-bg-start: #0f0c29;
    --body-bg-mid: #302b63;
    --body-bg-end: #24243e;
    --bs-body-font-family: 'Roboto', sans-serif;
}

body {
    font-family: var(--bs-body-font-family);
    background: linear-gradient(135deg, var(--body-bg-start), var(--body-bg-mid), var(--body-bg-end));
    background-attachment: fixed;
    color: var(--text-color);
    overflow-x: hidden;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape-1, .shape-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(100, 0, 255, 0.4);
    top: -150px;
    left: -150px;
    animation: moveShape1 25s infinite alternate;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    bottom: -100px;
    right: -100px;
    animation: moveShape2 20s infinite alternate;
}

@keyframes moveShape1 {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(200px, 300px) rotate(360deg); }
}

@keyframes moveShape2 {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(-300px, -200px) rotate(-360deg); }
}

.navbar, .card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: box-shadow 0.3s ease-in-out;
}

.navbar {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.card {
    border-radius: 16px;
}

.card:hover, .navbar:hover {
     box-shadow: 0 8px 32px 0 var(--primary-glow);
}

.card-header {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.form-label {
    color: var(--text-muted);
}

.form-control, .form-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    border-radius: 8px;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus, .form-select:focus {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 150, 255, 0.25);
}

select.form-select option {
    background: #343a40;
    color: var(--text-color);
}

.btn {
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.btn-outline-light:hover {
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.3);
}

.btn-success:hover {
     box-shadow: 0 0 15px 5px rgba(25, 135, 84, 0.5);
}

.table {
    border-color: var(--glass-border);
    color: var(--text-color);
    background-color: transparent;
}

.table > :not(caption) > * > * {
    background-color: transparent;
}

#coronarySegments > thead.table-light {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--glass-border);
}

#coronarySegments th {
    vertical-align: middle;
    text-align: center;
    color: var(--text-muted);
    border-bottom-width: 1px;
}

#coronarySegments td {
    vertical-align: middle;
    padding: 0.5rem;
    border-color: var(--glass-border);
}

#coronarySegments tbody td:first-child {
    font-weight: 500;
    color: var(--text-color);
}

#coronarySegments tbody tr {
    background: rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

#coronarySegments tbody tr:hover {
    background: rgba(var(--bs-primary-rgb), 0.15);
}

#coronarySegments .hrp-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.hrp-checkbox + label, .modifier-checkbox + label {
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.hrp-checkbox:checked + label, .modifier-checkbox:checked + label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.hrp-checkbox, .modifier-checkbox {
    display: none;
}

#dominantTypeLabel i {
    color: var(--text-muted);
    cursor: help;
}

.tooltip {
    --bs-tooltip-bg: #212529;
    --bs-tooltip-opacity: 0.95;
    --bs-tooltip-color: var(--text-color);
    --bs-tooltip-arrow-color: #212529;
    font-size: 0.9rem;
}

#report-preview {
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    margin: 1rem auto;
    border: 1px solid #D3D3D3;
    background: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    color: #000;
    font-size: 10pt;
    line-height: 1.4;
}

#report-preview h1 {
    font-size: 18pt;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

#report-preview h2 {
    font-size: 14pt;
    font-weight: bold;
    color: #075985;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
}

#report-preview .header-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

#report-preview .header-table td {
    padding: 4px 0;
    font-size: 10pt;
}

#report-preview .header-table td:first-child {
    font-weight: bold;
    width: 25%;
}

#report-preview p, #report-preview div{
    margin-bottom: 12px;
}

#report-preview .section-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

#report-preview .final-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

#report-preview .final-summary-title {
    font-weight: bold;
    font-size: 12pt;
    margin-bottom: 10px;
}

#report-preview .coronary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 9pt;
}

#report-preview .coronary-table th, 
#report-preview .coronary-table td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: left;
}

#report-preview .coronary-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}