/* Global page styling */
body {
    background-color: #0d0d0d;
    color: #e6e6e6;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;

    /* IMPORTANT CHANGE */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* stick everything to the top */
    
    padding: 40px 20px;
    min-height: 100vh;
    overflow-y: auto; /* allow scrolling */
    gap: 20px;
}

/* File input */
#fileInput {
    background: #1a1a1a;
    color: #7ecc4d;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    width: auto;
}

/* Button styling */
button {
    background: linear-gradient(135deg, #3a86ff, #5f9cff);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    box-shadow: 0 4px 14px rgba(58, 134, 255, 0.35);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(58, 134, 255, 0.45);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(58, 134, 255, 0.3);
}

/* Link display area */
#link {
    display: block;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px;
    width: 100%;
    max-width: 900px;

    color: #9fd3ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    word-break: break-word;
    overflow-wrap: anywhere;

    white-space: pre-wrap;
}

#status {
    background: #1a1a1a;
    color: #e6e6e6;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    width: auto;

    color: #9fd3ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    word-break: break-word;
    overflow-wrap: anywhere;

    white-space: pre-wrap;
}

.button-row {
    position: relative;
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center; /* center main button */
    align-items: center;
}

.main-btn {
    padding: 12px 28px;
    font-size: 16px;
}

.file-btn {
    position: absolute;
    right: 0;
    padding: 6px 14px;
    font-size: 13px;
}

/* Tooltip base */
.file-btn .tooltip {
    position: absolute;
    bottom: 120%;              /* appear above button */
    right: 0;
    background: #111;
    color: #9fd3ff;
    border: 1px solid #333;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

/* Show on hover */
.file-btn:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}


/* Info button placement */
.info-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 14px;
}

/* Overlay background */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Hide overlay */
.hidden {
    display: none;
}

/* Modal window */
.info-window {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 500px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    color: #e6e6e6;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: #9fd3ff;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 14px;
    cursor: pointer;
}

.close-btn:hover {
    background: #222;
}