@font-face {
    font-family: pt-mono;
    src: url('PTMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-size: 16px;
    outline: none;
    border: none;
    font-family: 'Noto Sans', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #141414;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.block {
    display: inline-flex;
    background-color: #1f1f1f;
    border: 1px solid #313131;
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.text-block {
    padding: 20px;
    gap: 5px;
    flex-direction: column;
    align-items: flex-start;
    color: #fcfcfc;
}

.text-block p {
    font-size: 18px;
}

.block .icon {
    width: 80px;
    height: 80px;
    margin: 16px;
    margin-top: auto;
    margin-bottom: auto;
    pointer-events: none;
    user-select: none;
    border-radius: 15px;
    border: 1px solid #313131;
    box-shadow: 10px 5px 30px rgba(0, 0, 0, 0.5);
}

.block .qr {
    width: 96px;
    height: 96px;
    margin-top: auto;
    margin-bottom: auto;
    pointer-events: none;
    user-select: none;
}

/* Allow flex children to shrink and prevent overflow */
.block > * {
    min-width: 0;
}

.block .icon,
.block .qr {
    flex: 0 0 auto;
}

.block a {
    color: #fcfcfc;
    /* Fluid font size: scales with viewport but constrained between 12px and 24px */
    font-size: clamp(12px, 3.5vw, 24px);
    padding: 8px 12px;
    text-decoration: underline;
    font-family: 'pt-mono', monospace;
    flex: 1 1 auto; /* allow the link to shrink/grow */
    min-width: 0; /* necessary for flex items to shrink properly */
    white-space: nowrap; /* keep on one line while shrinking */
    overflow: hidden; /* prevent overflow when min font-size reached */
    text-overflow: ellipsis; /* show ellipsis as last resort */
}

.container {
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

/* Small viewport tweaks: reduce icon sizes so they don't force overflow on very small screens */
@media (max-width: 480px) {
    .block .icon {
        width: 48px;
        height: 48px;
        margin: 8px;
    }
    .block .qr {
        width: 64px;
        height: 64px;
    }
    .container {
        margin: 12px;
        padding: 8px;
    }
}