/* Light mode variables */
:root {
    --background: #f5f5f5;
    --text-color: #222;
    --card-bg: #fff;
    --card-border: #b3d1f7;
    --card-shadow: rgba(33,150,243,0.10);
    --link-color: #1769aa;
    --link-hover-bg: #d0e7ff;
    --link-hover-border: #2196F3;
    --link-desc: #4a6fa1;
}

/* Dark mode variables */
[data-theme="dark"] {
    --background: #181c1f;
    --text-color: #e0e6ed;
    --card-bg: #23272b;
    --card-border: #334155;
    --card-shadow: rgba(33,150,243,0.18);
    --link-color: #90caf9;
    --link-hover-bg: #263445;
    --link-hover-border: #90caf9;
    --link-desc: #b0bec5;
}
/* Chest thumbnail bottom right */
/* Container for chest thumbnails */
#chest-thumbs-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}
.chest-thumb {
    width: 54px;
    height: 54px;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    background: var(--card-bg);
    transition: transform 0.15s, box-shadow 0.15s;
    margin-left: 0;
}
.chest-thumb:hover {
    transform: scale(1.13);
    box-shadow: 0 6px 18px rgba(33,150,243,0.18);
}

/* Fullscreen overlay for chest */
#chest-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.88);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.chest-fullscreen {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(33,150,243,0.25);
    background: var(--card-bg);
}
@media (max-width: 600px) {
    .top-right-widgets {
        display: none !important;
    }
}
/* Enhanced main links section */
#main-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin: 2em auto 1.5em auto;
    max-width: 900px;
}
.link-card {
    background: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 2px 12px var(--card-shadow);
    border: 1.5px solid var(--card-border);
    transition: box-shadow 0.2s, transform 0.15s, border 0.2s;
    min-width: 220px;
    max-width: 320px;
    flex: 1 1 220px;
    display: flex;
    align-items: stretch;
    max-height: 80px;
}
.link-card a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--link-color);
    padding: 22px 24px;
    width: 100%;
    border-radius: 18px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.link-card a:hover, .link-card a:focus {
    background: var(--link-hover-bg);
    box-shadow: 0 8px 24px var(--card-shadow);
    border: 1.5px solid var(--link-hover-border);
    color: var(--link-color);
    transform: scale(1.035);
    z-index: 1;
}
.link-card img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-right: 20px;
    box-shadow: 0 2px 8px rgba(33,150,243,0.10);
    background: var(--card-bg);
    flex-shrink: 0;
}
.link-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.link-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--link-color);
}
.link-desc {
    font-size: 1em;
    color: var(--link-desc);
    opacity: 0.85;
}

@media (max-width: 600px) {
    #main-links {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        margin: 1.2em 0 1.2em 0;
        width: 100vw;
        max-width: 100vw;
        padding: 0 0 24px 0;
    }
    .link-card {
        min-width: 0;
        max-width: 95vw;
        width: 95vw;
    }
    .link-card a {
        padding: 18px 10px;
        font-size: 1em;
    }
    .link-card img {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    .link-title {
        font-size: 1.1em;
    }
    .link-desc {
        font-size: 0.97em;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text-color);
}

/* Responsive map and flight widgets */
.top-right-widgets {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 95vw;
    max-width: 340px;
    z-index: 100;
}
.top-right-widgets > div {
    box-shadow: 0 2px 8px var(--card-shadow);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    margin-bottom: 10px;
}
.top-right-widgets iframe {
    width: 100%;
    min-width: 200px;
    height: 180px;
    border: none;
    display: block;
}

#weather {
    min-width: 0;
    min-height: 200px;
    display: block;
    margin: 1em auto;
    max-width: 95vw;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--card-shadow);
    padding: 1em;
}

#links {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    box-sizing: border-box;
    padding: 16px 0;
    width: 100%;
    max-width: 100vw;
}

#links div {
    margin: 0 8px 16px 8px;
}

#links div a {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1.5px solid var(--card-border);
    box-shadow: 0 1px 6px var(--card-shadow);
    padding: 14px 20px;
    transition: box-shadow 0.2s, transform 0.15s, background 0.2s, border 0.2s;
    font-weight: 500;
    font-size: 1.1em;
    color: var(--link-color);
    letter-spacing: 0.01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
/* Enhanced hover effect for links */
#links div a:hover, #links div a:focus {
    background: var(--link-hover-bg);
    box-shadow: 0 6px 18px var(--card-shadow);
    border: 1.5px solid var(--link-hover-border);
    color: var(--link-color);
    transform: scale(1.035);
    z-index: 1;
}
#links div a span {
    margin-left: 16px;
    font-size: 1.2em;
    color: var(--link-color);
    font-weight: 600;
    letter-spacing: 0.01em;
}
#links div a img {
    max-height: 60px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(33,150,243,0.10);
    background: var(--card-bg);
    padding: 4px;
}

form[action*="google.com/search"] {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 1em auto;
    max-width: 95vw;
}
form[action*="google.com/search"] input[type="text"] {
    padding: 0.5em;
    width: 60vw;
    max-width: 250px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
}
form[action*="google.com/search"] button {
    padding: 0.5em 1em;
    border-radius: 4px;
    border: none;
    background: #2196F3;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}
form[action*="google.com/search"] button:hover {
    background: #1769aa;
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    .top-right-widgets {
        position: static;
        width: 100vw;
        max-width: 100vw;
        margin: 0 auto 1em auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: auto;
    }
    .top-right-widgets > div {
        width: 95vw;
        margin-bottom: 12px;
    }
    .top-right-widgets iframe {
        min-width: 0;
        width: 100%;
        height: 160px;
    }
    #weather {
        padding: 0.5em;
        font-size: 0.95em;
        margin-top: 1em;
        margin-bottom: 1em;
        max-width: 98vw;
    }
    #links {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        width: 100vw;
        padding: 0 0 24px 0;
    }
    #links div {
        width: 90vw;
        display: flex;
        justify-content: center;
    }
    #links div a {
        padding: 16px 12px;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        font-size: 1em;
    }
    #links div a img {
        max-height: 40px;
    }
}