/* General custom styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Code display styling */
.code-container {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.code-display {
    display: flex;
    justify-content: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.code-digit {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--bs-info);
    padding: 0 0.3rem;
    text-shadow: 0 0 10px rgba(var(--bs-info-rgb), 0.5);
    animation: pulse 2s infinite;
}

/* Smaller code digits for the account table */
.code-pill {
    background-color: var(--bs-dark);
    border-radius: 4px;
    padding: 0.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.code-digit-small {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: var(--bs-info);
    padding: 0 0.2rem;
    text-shadow: 0 0 5px rgba(var(--bs-info-rgb), 0.3);
    animation: pulse 2s infinite;
}

.code-timer {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
    white-space: nowrap;
}

.text-warning {
    color: var(--bs-warning) !important;
}

.text-danger {
    color: var(--bs-danger) !important;
}

/* Table styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid var(--bs-border-color);
}

/* Animation for the code digits */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* Animation for updated digits */
@keyframes highlight-update {
    0% {
        transform: scale(1);
        color: var(--bs-info);
    }
    50% {
        transform: scale(1.2);
        color: var(--bs-success);
        text-shadow: 0 0 15px rgba(var(--bs-success-rgb), 0.7);
    }
    100% {
        transform: scale(1);
        color: var(--bs-info);
    }
}

/* Style for updated digits */
.digit-updated {
    animation: highlight-update 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .code-digit {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .code-digit {
        font-size: 1.5rem;
    }
}
