.centered-main {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5% 5%;
    flex-grow: 1;
}

.content-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 3rem;
    border-radius: 12px;
    max-width: 750px;
    width: 100%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.app-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
        "icon title"
        "icon desc"
        "icon actions"
        ". legal";
    column-gap: 2rem;
    row-gap: 1.2rem;
}

.app-icon {
    grid-area: icon;
    width: 128px;
    height: 128px;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.app-title {
    grid-area: title;
    font-size: 2.8rem;
    color: #16a086;
    line-height: 1;
    margin: 0;
    align-self: end; 
}

.app-description {
    grid-area: desc;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #c7c7d2;
    margin: 0;
}

.app-actions-container {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-actions {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 1rem;
}

.app-actions-container .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* Adds clean spacing between FontAwesome icons and text */
    width: 100%;
}

.btn.btn-inactive {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(60%);
}

.app-legal {
    grid-area: legal;
    font-size: 0.9rem;
    color: #c7c7d2;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: -0.25rem;
    font-weight: 500;
}

.app-legal a {
    color: #c7c7d2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.app-legal a:hover {
    color: #16a086;
    text-decoration: underline;
}

.app-legal .divider {
    color: #7f8c8d;
    font-size: 0.8rem;
}

@media (max-width: 650px) {
    .content-card {
        padding: 2rem;
    }

    .app-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "icon title"
            "desc desc"
            "actions actions"
            "legal legal";
        column-gap: 1.25rem;
        row-gap: 1.25rem;
    }

    .app-icon {
        width: 100px;
        height: 100px;
        border-radius: 22px;
    }

    .app-title {
        align-self: center; 
        font-size: 2.5rem;
    }
    
    .app-actions {
        grid-template-columns: 1fr;
    }

    .app-legal {
        justify-content: center;
        margin-top: 0;
    }
}

.policy-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 800px;
    width: 100%;
}

.back-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #c7c7d2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
    color: #16a086;
    transform: translateX(-4px); 
}

#policy-container {
    line-height: 1.6;
    color: #c7c7d2;
}

#policy-container h1 {
    color: #16a086;
    margin-bottom: 0.5rem;
}

#policy-container h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

#policy-container p {
    margin-bottom: 1.5rem;
}

#policy-container ul {
    margin-bottom: 1.5rem;
    margin-left: 2rem;
}

#policy-container a {
    color: #16a086;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

#policy-container a:hover {
    opacity: 0.8;
}

.trailer-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.trailer-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    /* Strict 9:16 aspect ratio logic that fits any screen safely */
    height: 85vh;
    max-height: 750px;
    max-width: 90vw; 
    aspect-ratio: 9 / 16;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.trailer-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: transparent;
    border: none;
    color: #c7c7d2;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: #16a086;
}

.modal-video-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

.modal-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}