@font-face {
    font-family: 'Downey';
    src: url('Downey.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    src: url('Inter.ttf') format('truetype');
}

html {
    height: 100%;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px 20px 0;
    text-align: center;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -1;
}

.banner-left {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    max-width: 50vw;
    max-height: 30vh;
}

.banner-right {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    max-width: 50vw;
    max-height: 30vh;
}

header {
    margin-bottom: 15px;
}

#logo {
    width: 120px;
    margin-bottom: 10px;
}

h1 {
    font-family: 'Downey', sans-serif;
    font-size: 2.2em;
    margin: 0;
    font-weight: normal;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 15px;
}

.size-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
}

.size-buttons button {
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    flex: 1;
    max-width: 120px;
}

.size-buttons button.selected {
    background-color: #009aee;
    border-color: #009aee;
}

.test-columns {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex: 1;
    min-height: 0;
}

.speed {
    font-size: 0.9em;
    color: #ccc;
    height: 1.2em;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 10px;
}

.container canvas {
    margin-top: 10px;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-sizing: border-box;
}

#httpCanvas {
    border: 1px solid #FF1717;
}

#xrtcCanvas {
    border: 1px solid #009aee;
}

.comparison {
    font-size: 0.9em;
    height: 1.2em;
}

.faster {
    color: #009aee;
}

.slower {
    color: #FF1717;
}

.test-column {
    border: 2px solid;
    padding: 10px;
    width: 300px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.percentage {
    font-size: 0.9em;
    height: 1.2em;
}

#test1 {
    border-color: #FF1717;
}

#test2 {
    border-color: #009aee;
}

.controls h2,
.test-column h2 {
    font-weight: normal;
    font-size: 1.4em;
    letter-spacing: 1px;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.test-column h2 {
    font-family: 'Inter', sans-serif;
    text-transform: capitalize;
}

.test-area {
    margin-top: 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.test-btn {
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1em;
    border-radius: 5px;
    margin: 0 auto 15px;
    display: block;
    font-family: 'Inter', sans-serif;
}

.progress-container {
    height: 20px;
    margin-bottom: 10px;
}

.test-progress {
    width: 100%;
    visibility: hidden; /* Hide by default */
}

.results {
    font-size: 1.1em;
    min-height: 4.5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.data-link-container {
    font-family: 'Inter', sans-serif;
    font-size: 0.8em;
    margin-top: 15px;
    padding-bottom: 15px;
}

.data-link-container a {
    color: #ccc;
}

/* Responsive design for size buttons */
@media (max-width: 768px) {
    .size-buttons {
        margin: 0 auto;
    }
    
    .size-buttons button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .size-buttons button {
        padding: 6px 8px;
        font-size: 0.8em;
    }
}
