html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: fixed;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-image: url('images/background-landscape.jpg');
    background-position: center right;
    background-size: cover;
    background-repeat: no-repeat;
}

.gradient-overlay {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    background: linear-gradient(180deg, 
        rgba(24, 0, 0, 0.4) 0%,
        rgba(16, 0, 0, 0.6) 50%,
        rgba(8, 0, 0, 0.9) 100%
    );
    pointer-events: none;
}

@supports (-webkit-overflow-scrolling: touch) {
    body {
        padding-bottom: env(safe-area-inset-bottom, 20px);
        min-height: -webkit-fill-available;
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    height: 56px;
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    height: 100%;
}

.logo img {
    height: 24px;
    width: auto;
    display: block;
}

.logo span {
    font-size: 16px;
    font-weight: 700;
    color: #B5B5B5;
    letter-spacing: -0.02em;
}

.social-icons {
    display: flex;
    align-items: center;
    height: 100%;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #B5B5B5;
    font-size: 20px;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    padding: 0 8px;
}

.social-icons a:hover {
    opacity: 1;
}

.content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    min-height: 100%;
}

@supports (padding: env(safe-area-inset-bottom)) {
    .content-container {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
        transform: translateY(calc(env(safe-area-inset-bottom) * -2));
    }
}

.content-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.cta-box {
    position: relative;
    width: calc(100% - 16px);
    max-width: 343px;
    box-sizing: border-box;
    margin: 32px auto;
    margin-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    padding: 16px;
    text-align: center;
    background-color: rgba(0, 0, 0, 1.0);
    border-radius: 12px;
    z-index: 2;
}

@supports (padding: env(safe-area-inset-bottom)) {
    .cta-box {
        margin-bottom: calc(48px + env(safe-area-inset-bottom));
        transform: translateY(calc(env(safe-area-inset-bottom) * -1.5));
    }
}

.cta-box h2 {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cta-box p {
    font-size: 15px;
    margin: 0 0 28px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
}

.button {
    flex: 1;
    min-width: 0;
    max-width: 160px;
    height: 42px;
    padding: 0 12px;
    background-color:rgba(124, 62, 0, 0.8) 100%;
    color: #fff;
    border: none;
    text-decoration: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.button i {
    font-size: 16px;
}

.button span {
    display: inline-block;
    text-overflow: ellipsis;
    overflow: hidden;
}

.app-store-button {
    width: 160px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin: 0;
}

.app-store-button:hover {
    transform: translateY(-1px);
}

.app-store-button img {
    height: 45px;
    width: auto;
}

.copyright {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
}

@supports (-webkit-overflow-scrolling: touch) {
    .copyright {
        padding-bottom: max(8px, env(safe-area-inset-bottom, 20px));
    }
}

.copyright p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* Mobile Layout (up to 767px) */
@media screen and (max-width: 767px) and (orientation: portrait) {
    body {
        min-height: 100vh;
        height: 100vh;
    }

    header {
        height: 56px;
        padding: 4px 16px;
    }

    .content-container {
        height: calc(100vh - 56px);
        min-height: 0;
        padding: 16px;
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
        margin-bottom: calc(env(safe-area-inset-bottom, 0px) * -1);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .cta-box {
        width: 100%;
        max-width: 343px;
        padding: 16px;
        margin-bottom: 8px;
        transform: translateY(calc((env(safe-area-inset-bottom, 0px) + 48px) * -1));
    }

    .cta-box h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .cta-box p {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .button-container {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .button {
        height: 40px;
        min-height: 40px;
        padding: 0 16px;
        font-size: 14px;
    }

    .app-store-button img {
        height: 40px;
    }

    .copyright {
        bottom: 8px;
    }
}

/* Tablet Layout (768px to 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    header {
        height: 56px;
        padding: 4px 24px;
    }
    .cta-box {
        padding: 16px;
    }
}

/* Tablet Landscape Layout */
@media screen and (min-width: 1024px) and (max-height: 768px) {
    .cta-box {
        bottom: 40px;
    }
}

/* Extra Small Mobile Layout (up to 359px) */
@media screen and (max-width: 374px) {
    .cta-box {
        padding: 16px 8px;
    }
    
    .button {
        font-size: 13px;
        height: 40px;
        padding: 0 10px;
    }
}

@media screen and (min-width: 375px) {
    .cta-box {
        margin-left: max(8px, calc((100% - 343px) / 2));
        margin-right: max(8px, calc((100% - 343px) / 2));
    }
}

/* Small Screen Landscape Layout */
@media screen and (max-height: 400px) and (orientation: landscape) {
    header {
        padding: 8px 16px;
        height: 42px;
    }

    .logo img {
        height: 20px;
    }

    .logo span {
        font-size: 14px;
    }

    .content-container {
        justify-content: center;
        padding: calc(42px + 8px) 8px 8px 8px;
    }
    
    .cta-box {
        /* Calculate scale based on available height */
        transform: scale(calc((100vh - 42px - 16px) / 400));
        transform-origin: center center;
        margin: 32px auto;
    }
}

/* Portrait mode with iOS toolbar fix */
@media screen and (orientation: portrait) {
    .content-container {
        justify-content: flex-end;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    }
    
    .cta-box {
        margin-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    }
}