/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 20px;
    overflow: hidden;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 14px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    z-index: 10;
    gap: 12px;
    flex-shrink: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text);
    transform: rotate(90deg);
}

.modal-scroll {
    overflow-y: auto;
    padding: 0 24px 24px 24px;
    flex: 1;
}

.modal-scroll::-webkit-scrollbar {
    width: 4px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.modal-body {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-secondary);
    overflow-x: hidden;
    word-wrap: break-word;
    padding-top: 16px;
}

.modal-body p { margin-bottom: 14px; }
.modal-body strong { color: var(--text); }
.modal-body h3 {
    color: var(--text);
    font-size: 20px;
    margin: 18px 0 10px;
    word-wrap: break-word;
    line-height: 1.4;
}
.modal-body ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 18px;
}
.modal-body ul li {
    padding: 6px 0 6px 24px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.7;
}
.modal-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.modal-body .modal-image {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 18px;
    background: var(--surface);
}

.modal-body .modal-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 50vh;
    object-fit: contain;
}

/* ========================================
   COMMIT STATUS INDICATOR
   ======================================== */
.commit-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.commit-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.commit-status .status-dot.pending {
    background: var(--status-pending);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.commit-status .status-dot.building {
    background: var(--status-building);
    animation: pulse-dot 0.8s ease-in-out infinite;
}

.commit-status .status-dot.success {
    background: var(--status-success);
    animation: none;
}

.commit-status .status-dot.error {
    background: var(--status-error);
    animation: none;
}

.commit-status.pending {
    background: rgba(245,158,11,0.12);
    color: var(--status-pending);
    border: 1px solid rgba(245,158,11,0.15);
}

.commit-status.building {
    background: rgba(108,99,255,0.12);
    color: var(--status-building);
    border: 1px solid rgba(108,99,255,0.15);
}

.commit-status.success {
    background: rgba(16,185,129,0.12);
    color: var(--status-success);
    border: 1px solid rgba(16,185,129,0.15);
}

.commit-status.error {
    background: rgba(239,68,68,0.12);
    color: var(--status-error);
    border: 1px solid rgba(239,68,68,0.15);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}