.modal-backdrop.in {
    opacity: 0.6;
    background: #000000;
}

#welcomeModal .modal-dialog, #portalInfoModal .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0 auto;
    max-width: 800px;
}

#welcomeModal .modal-content, #portalInfoModal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 70px rgba(30, 41, 99, 0.35), 0 0 40px rgba(239, 68, 68, 0.12);
    animation: modalPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 96vh;
    overflow-y: auto;
    position: relative;
}

#welcomeModal .modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444, #f59e0b);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    z-index: 10;
}

@keyframes shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

@keyframes modalPop {
    0% { transform: scale(0.8) translateY(30px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.warning-header {
    padding: 24px 24px 16px;
    text-align: center;
    position: relative;
}

.warning-icon-container {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 20px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floaty 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.5);
    transform: rotate(45deg);
}

.warning-icon-container .glyphicon {
    font-size: 30px;
    color: white;
    transform: rotate(-45deg);
}

@keyframes floaty {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(-8px); }
}

.warning-header h2 {
    color: #dc2626;
    margin: 0;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #dc2626, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.warning-header .subtitle {
    color: #64748b;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.warning-body {
    padding: 8px 24px 20px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.official-portal-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.1);
}

.official-portal-box .glyphicon-ok-circle {
    font-size: 28px;
    color: #16a34a;
}

.official-portal-box h4 {
    text-decoration: none;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.official-portal-box .portal-url {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    white-space: nowrap;
    /* text-align: center; */
}

.portal-link-trigger {
    width: 100%;
    text-align: center;
    text-decoration: underline;
    color: #337ab7;
    cursor: pointer;
}

.danger-zone {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.danger-zone h4 {
    color: #dc2626;
    font-weight: 700;
    margin: 0 0 10px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.danger-zone h4 .glyphicon {
    margin-right: 8px;
}

.danger-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.danger-list li {
    display: flex;
    align-items: center;
    font-size: 12.5px;
    color: #334155;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.25s ease;
}

.danger-list li:hover {
    background: rgba(239, 68, 68, 0.12);
    transform: translateX(3px);
}

.danger-list li .glyphicon {
    color: #ef4444;
    margin-right: 8px;
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.do-not-share-box {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
    text-align: center;
}

.do-not-share-box h4 {
    color: #b45309;
    font-weight: 700;
    margin: 0 0 12px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.do-not-share-box h4 .glyphicon {
    margin-right: 8px;
    animation: shake 0.6s infinite;
    display: inline-block;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-12deg); }
    75% { transform: rotate(12deg); }
}

.credentials-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.credential-item {
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    transition: all 0.25s ease;
}

.credential-item:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.25);
}

.credential-item .glyphicon {
    color: #d97706;
    font-size: 15px;
}

.credential-item span:last-child {
    font-weight: 600;
    color: #334155;
    font-size: 12.5px;
}

.consequence-box {
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #ef4444;
    padding: 12px 14px;
    border-radius: 0 12px 12px 0;
}

.consequence-box p {
    margin: 0;
    color: #475569;
    font-size: 12.5px;
    line-height: 1.6;
}

.consequence-box strong {
    color: #dc2626;
}

.warning-footer {
    background: rgba(248, 250, 252, 0.7);
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.btn-understand {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    color: white;
    padding: 13px 40px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-understand:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.6);
    color: white;
}

.btn-understand:disabled {
    background: #cbd5e1;
    color: #ffffff;
    box-shadow: none;
    cursor: not-allowed;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #22c55e;
}

.checkbox-container label {
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    margin: 0;
    font-size: 13px;
}

#welcomeModal .modal-content::-webkit-scrollbar,
#portalInfoModal .modal-content::-webkit-scrollbar {
	width: 6px;
}

#welcomeModal .modal-content::-webkit-scrollbar-thumb,
#portalInfoModal .modal-content::-webkit-scrollbar-thumb {
	background: rgba(239, 68, 68, 0.5);
	border-radius: 3px;
}

@media (max-width: 768px) {
    .danger-list { grid-template-columns: 1fr; }
    .credentials-icons { gap: 8px; }
    .credential-item { padding: 6px 12px; }
    #welcomeModal .modal-dialog, #portalInfoModal modal-dialog { padding: 5px; }
    .official-portal-box { flex-direction: column; gap: 10px; }
}

.modal.stacked-modal {
    z-index: 1060;
}
.modal-backdrop + .modal-backdrop {
    z-index: 1055;
}

.portal-list {
    border-color: rgba(0,0,0,0.08);
    background: #f8f9fa;
}

.portal-row-icon {
    font-size: 22px;
    color: #16a34a;
    flex: 0 0 22px;
    margin-right: 4px;
}

.portal-row-url,
a.portal-row-url {
    background: #1e293b;
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(30, 41, 59, 0.25);
    text-decoration: none;
    display: inline-block;
}

a.portal-row-url:hover {
    color: white;
    text-decoration: none;
    opacity: 0.9;
}

.portal-row + .portal-row {
    border-top: 1px solid #e2e8f0;
}

.portal-row:hover {
    background: #f1f3f5;
}

.portal-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 10px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.portal-row-text {
    flex: 1;
}

.portal-row-text strong {
    display: block;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
}

.portal-row-text small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

@media (max-width: 480px) {
    .portal-row {
        flex-wrap: wrap;
    }
    .portal-row-url {
        margin-left: 34px;
        margin-top: 2px;
    }
    .portal-row-text {
        margin-bottom: 0;
    }
}

/* Info modal variant - calmer, no red/warning styling */
.info-header .info-icon-container {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    animation: none;
    transform: none;
}

.info-header .info-icon-container .glyphicon {
    transform: none;
}

.info-title {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #1d4ed8;
}

#portalInfoModal .modal-content::before {
	content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #2563eb, #38bdf8);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    z-index: 10;

}

.info-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.info-btn:hover:not(:disabled) {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.6);
}

.portal-tooltip {
    position: absolute;
    top: -34px;
    right: 10px;
    background: #1e293b;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 20;
}

.portal-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 16px;
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

.portal-tooltip.show {
    opacity: 1;
}
