@media (max-width: 770px) {
    html {
        font-size: 14px;
    }
    
    body {
        line-height: 1.4;
    }
    
    .window, .bottlePanel {
        padding: 0.75em;
    }
    
    .header h1 {
        font-size: 35px;
    }
    
    .inboxContainer {
        flex-direction: column;
    }
    
    .inboxTable, .bottlePanel{
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }
    
    .bottleArt {
        font-size: 10px;
    }
    
    .messageTitle {
        font-size: 0.95em;
    }
    
    .bottlePanel {
        margin-top: 16px;
        min-height: auto;
    }
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: "GFS Neohellenic", sans-serif;
    font-size: 20px;
    background: #4b6f7c;
}

.asciiWaves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 35px;
    line-height: 1.2;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    animation: bob 6s ease-in-out infinite alternate;
    color: #5db6ae;
}

.asciiWaves pre {
    display: inline-block;
    white-space: pre;
    animation: waves 200s linear infinite
}

@keyframes waves {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes bob {
    0% {transform: translateY(0);}
    50% {transform: translateY(10px);}
    100% {transform: translateY(0);}
}

.container {
    margin: 20px auto;
    width: 90%;
    max-width: 1200px;
    min-width: 300px;
    background: linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.7));
    backdrop-filter: blur(2px);
    border: 2px solid #454d8d;
    color: #454d8d;
    box-shadow: inset 0 0 60px white;
}

.header {
    background-image: url(images/headerBg.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: left;
    color: #180e56;
    font-weight: bold;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    border-bottom: 2px solid #454d8d;
}

.header h1 span {
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

.header:hover h1 span {
    animation: headerWave 1.5s ease-in-out infinite alternate;
}

.header h1 span:nth-child(2) { animation-delay: 0.1s;}
.header h1 span:nth-child(3) { animation-delay: 0.2s;}
.header h1 span:nth-child(4) { animation-delay: 0.3s;}
.header h1 span:nth-child(5) { animation-delay: 0.4s;}

@keyframes headerWave {
    0% { transform: translateY(0);}
    50% { transform: translateY(-6px);}
    100% { transform: translateY(0);}
}

.inboxContainer {
    display: flex;
    gap: 16px;
}

.inboxTable {
    flex: 0 1 40%;
    min-width: 300px;
    max-width: 500px;
    overflow-x: auto;
    border-right: 2px solid #454d8d;
}

.bottlePanel {
    flex: 1 1 60%;
    min-width: 250px;
    padding: 20px;
    min-height: 60vh;
    overflow-y: auto;
}

.bottlePanel img {
    max-width: 100%;
    height: auto;
    display: block;
    /*margin: 1em auto;*/
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.05em;
    line-height: 1.4;
}

th {
    padding: 12px 10px;
    background: #b1d9d8;
    border-bottom: 2px solid #454d8d;
}

td {
    padding: 12px 10px;
    vertical-align: middle;
    cursor: pointer;
    caret-color: transparent;
    border-bottom: 1px solid #454d8d;
}

.bottleSubject, .bottleDate {
    text-align: center;
}

.bottle:hover {
    background: white;
}

.bottleListing {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.bottleArt {
    white-space: pre;
    line-height: 1;
    font-size: 12px;
    display: inline-block;
    vertical-align: top;
    margin-right: 16px;
    transition: transform 0.3s ease-in-out;
}

.bottle:hover .bottleArt {
    animation: headerWave 1.2s ease-in-out infinite alternate;
}

.windowFooter {
    text-align: center;
    padding: 10px 15px;
    margin-top: 16px;
    border-top: 2px solid #452d8d;
    color: #454d8d;
    font-size: 0.9em;
    font-style: italic;
}

.bottleSubject {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.bottleContainer {
    display: none;
}

.bottleContainer h2 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.messageDate {
    font-size: 0.9em;
    margin-top: -15px;
    margin-bottom: 30px;
    line-height: 1.1;
    display: block;
    color: #555;
}

.shippingForecast {
    background: rgba(93,182,174,0.15);
    border-left: 4px solid #5db6ae;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 6px;
    line-height: 1.4;
    position: relative;
}

.selected {
    background-color: #c5dbe6;
}