/* Font Faces */
@font-face {
    font-family: 'GrilledCheese';
    src: url('fonts/GrilledCheeseBTNRegular.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Creabbrg';
    src: url('fonts/CREABBRG.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Creabbrg', sans-serif;
    background-color: #2c9ffe;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Content background container */
body::before {
    content: '';
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    height: 100%;
    background-image: url('pageBg.png');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 20px 20px;
    position: relative;
    z-index: 1;
}

.logo {
    max-width: 660px;
    width: 90%;
    height: auto;
}

/* Tagline */
.tagline {
    text-align: center;
    padding: 10px 20px 25px;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

.tagline-img {
    max-width: 500px;
    width: 80%;
    height: auto;
}

/* Info Section */
.info-section {
    padding: 20px;
    max-width: 1200px;
    margin: -30px auto 0;
    position: relative;
    z-index: 1;
    text-align: center;
}

.info-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

.character-left,
.character-right {
    position: absolute;
    bottom: 30px;
}

.character-left {
    right: calc(50% + 240px);
}

.character-right {
    left: calc(50% + 250px);
}

.character-right .character-shadow {
    left: calc(50% + 10px);
}

.character-left .character-img,
.character-left .character-shadow {
    max-width: 239px;
}

.character-img {
    max-width: 210px;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
}

.character-shadow {
    position: absolute;
    max-width: 210px;
    width: 100%;
    height: auto;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -2;
}

.info-box {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.info-box-content {
    width: 532px;
    height: 354px;
    background: linear-gradient(180deg, #84cdf2 0%, #0098f5 30%, #0098f5 100%);
    border: 3px solid #f4d92d;
    border-radius: 28px;
    padding: 0;
    overflow: hidden;
    text-align: left;
    box-shadow:
        inset 0 0 0 5px #5abaff,
        0 0 0 3px #2777a9;
}

.info-header {
    color: #fcd829;
    font-family: 'GrilledCheese', cursive;
    font-size: 1.6rem;
    text-align: center;
    padding: 15px 15px 10px;
    position: relative;
    text-shadow:
        -1px -1px 0 #60550e,
        1px -1px 0 #60550e,
        -1px 1px 0 #60550e,
        1px 1px 0 #60550e,
        -2px 0 0 #60550e,
        2px 0 0 #60550e,
        0 -2px 0 #60550e,
        0 2px 0 #60550e;
}

.info-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background: #258be1;
}

.info-tabs {
    display: flex;
    justify-content: center;
    padding: 0 15px;
    gap: 5px;
}

.tab-btn {
    background: transparent;
    border: none;
    border-radius: 0;
    color: #1c76d3;
    font-family: 'Creabbrg', sans-serif;
    font-size: 0.8rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(28, 118, 211, 0.3);
}

.tab-btn.active {
    background: #1c76d3;
    color: #fff;
}

.tab-content {
    background: linear-gradient(180deg, #3090D0 0%, #4AABF0 50%, #3090D0 100%);
    margin: 0 20px 10px;
    border-radius: 15px;
    padding: 8px;
    height: 225px;
    overflow-y: auto;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: flex;
    gap: 15px;
}

.tab-text {
    flex: 1;
}

.tab-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-text li {
    color: #fff;
    font-family: 'Creabbrg', sans-serif;
    font-size: 0.65rem;
    line-height: 1.3;
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
    text-align: left;
}

.tab-text li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 10px;
    height: 10px;
    background-image: url('info/bullet.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.tab-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 150px;
    flex-shrink: 0;
}

.tab-images img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 2px solid #1E6FA3;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tab-images img:hover {
    transform: scale(1.05);
    border-color: #f4d92d;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 200000;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #B8E04C;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Disclaimer Section */
.disclaimer-section {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    margin-top: -15px;
    position: relative;
    z-index: 1;
}

.disclaimer-container {
    position: relative;
    display: inline-block;
}

.disclaimer-img {
    max-width: 500px;
    width: 100%;
    height: auto;
    display: block;
}

.disclaimer-btn {
    position: absolute;
    bottom: 10px;
    right: -10px;
    transform: scale(0.9);
}

.download-btn,
.link-btn {
    display: inline-block;
    position: relative;
    transition: transform 0.2s ease;
}

.disclaimer-btn {
    transition: transform 0.2s ease;
}

.disclaimer-btn:hover {
    transform: scale(0.95);
}

.download-btn:hover,
.link-btn:hover {
    transform: scale(1.05);
}

.btn-normal {
    display: block;
}

.btn-hover {
    display: none;
}

.disclaimer-btn:hover .btn-normal,
.download-btn:hover .btn-normal,
.link-btn:hover .btn-normal {
    display: none;
}

.disclaimer-btn:hover .btn-hover,
.download-btn:hover .btn-hover,
.link-btn:hover .btn-hover {
    display: block;
}

.disclaimer-btn img {
    max-width: 320px;
    width: 100%;
    height: auto;
}

/* Download Section */
.download-section {
    padding: 40px 20px;
    text-align: center;
    margin-top: -55px;
    position: relative;
    z-index: 1;
}

.download-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 30px;
}

.download-icon {
    flex-shrink: 0;
}

.app-icon {
    max-width: 240px;
    width: 100%;
    height: auto;
    margin-top: 15px;
}

.download-content {
    text-align: center;
}

.download-title {
    font-family: 'GrilledCheese', cursive;
    font-size: 3rem;
    color: #fff;
    margin-top: 15px;
    margin-bottom: 0;
}

.download-subtitle {
    font-family: 'Creabbrg', sans-serif;
    font-size: 1.1rem;
    font-weight: normal;
    color: #7dc1ff;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.download-btn img {
    max-width: 260px;
    width: 100%;
    height: auto;
}

.instructions-link {
    display: inline-block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: normal;
    text-decoration: underline;
    letter-spacing: 1px;
    padding: 8px 16px;
    margin-top: -15px;
    transition: color 0.2s ease;
}

.instructions-link::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('download/installIcon.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 6px;
    vertical-align: middle;
}

.instructions-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Other Links Section */
.links-section {
    padding: 40px 20px;
    text-align: center;
    margin-top: -50px;
    position: relative;
    z-index: 1;
}

.links-title {
    font-family: 'GrilledCheese', cursive;
    font-size: 2rem;
    color: #7dc1ff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.links-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.link-btn img {
    height: 36px;
    width: auto;
}

/* Footer */
.footer {
    padding: 30px 20px;
    text-align: center;
    margin-top: -30px;
    position: relative;
    z-index: 1;
}

.footer-text {
    max-width: 900px;
    margin: 0 auto;
    color: #7dc1ff;
    font-size: 0.85rem;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

/* Host UI Popup Styles */
.host-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100001;
    justify-content: center;
    align-items: center;
}

.host-modal.active {
    display: flex;
}

.host-popup {
    position: relative;
    border-radius: 12px;
    padding: 30px 40px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow: visible;
}

.host-popup-strokes {
    box-shadow: inset 0 0 0 3px #5abaff, 0 0 0 3px #2a56b6 !important;
    background: linear-gradient(180deg, #84cdf2 0%, #0098f5 8%) !important;
}

.host-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    z-index: 10;
}

.host-close-btn img {
    width: 100%;
    height: 100%;
    content: url('host-ui/close.svg');
}

.host-close-btn:hover img {
    content: url('host-ui/closeHover.svg');
}

.host-close-btn:active img {
    content: url('host-ui/closeClick.svg');
}

.host-popup-title {
    font-family: 'GrilledCheese', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.host-popup-content {
    color: #fff;
    font-family: 'Creabbrg', sans-serif;
    font-size: 0.85rem;
    max-height: 60vh;
    overflow-y: auto;
}

.instructions-section {
    margin-bottom: 20px;
}

.instructions-section:last-child {
    margin-bottom: 0;
}

.instructions-section h3 {
    font-family: 'GrilledCheese', sans-serif;
    font-size: 1.1rem;
    color: #fcd829;
    margin-bottom: 10px;
    text-shadow:
        -1px -1px 0 #60550e,
        1px -1px 0 #60550e,
        -1px 1px 0 #60550e,
        1px 1px 0 #60550e;
}

.instructions-section ol {
    margin: 0;
    padding-left: 20px;
}

.instructions-section li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.instructions-section strong {
    color: #fcd829;
}

.mac-instructions-img {
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
    border-radius: 8px;
    border: 2px solid #5abaff;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mac-instructions-img:hover {
    transform: scale(1.02);
    border-color: #f4d92d;
}

#instructionsModal {
    -webkit-user-select: none;
    user-select: none;
}

#instructionsModal img:not(.expandable-img) {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.expandable-img {
    pointer-events: auto !important;
}

/* Responsive Design */
@media (max-width: 900px) {
    .info-container {
        flex-direction: column;
        gap: 20px;
    }

    .character-left,
    .character-right {
        margin: 0;
        order: 2;
    }

    .character-left {
        display: none;
    }

    .character-right {
        display: none;
    }

    .info-box {
        order: 1;
    }

    .character-img,
    .character-shadow {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .logo {
        max-width: 300px;
    }

    .download-container {
        flex-direction: column;
        gap: 20px;
    }

    .app-icon {
        max-width: 140px;
    }

    .download-title {
        font-size: 2.2rem;
    }

    .download-subtitle {
        font-size: 0.9rem;
    }

    .download-btn img {
        max-width: 160px;
    }

    .link-btn img {
        max-width: 180px;
    }

    .links-title {
        font-size: 1.6rem;
    }

    /* Hide download buttons on mobile */
    .download-buttons {
        visibility: hidden;
    }

    .instructions-link {
        visibility: hidden;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px 15px;
    }

    .logo {
        max-width: 250px;
    }

    .tagline-img {
        max-width: 280px;
    }

    .download-title {
        font-size: 1.8rem;
    }

    .download-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .download-btn img {
        max-width: 200px;
    }

    .links-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .footer-text {
        font-size: 0.65rem;
    }
}
