﻿.background {
    min-height: 100vh;
    background-image: url("../images/bg_03.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    position: sticky; /* optional: keep it visible while scrolling */
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.store-badge {
    height: 16px;
    width: auto;
    display: block;
    margin-right: 10px;
}

.app-main {
    flex: 1; /* pushes footer down */
    /* IMPORTANT: background image is set per-page via an inline style or CSS class */
    background-color: #0b1220;
    padding: 24px 16px;
    min-height: calc(100vh - 120px); /* rough: header+footer */
}


.app-footer {
    flex: 0 0 auto; /* footer takes only its content height */
    padding: 16px;
    background: rgba(0,0,0,0.04);
    border-top: 1px solid rgba(0,0,0,0.06);
}

/*.app-footer {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(0,0,0,0.04);
    border-top: 1px solid rgba(0,0,0,0.06);
}*/

    .app-footer a {
        margin-left: 12px;
        text-decoration: none;
        color: inherit;
    }

        .app-footer a:hover {
            text-decoration: underline;
        }

/* Content card with semi-transparent background for text visibility */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem auto;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Text inside content cards should be dark for readability */
.content-card,
.content-card * {
    color: #333;
    text-shadow: none !important;
}

.content-card h1,
.content-card h2,
.content-card h3,
.content-card h4,
.content-card h5,
.content-card h6 {
    background: transparent;
    padding: 0;
    display: block;
}

.content-card .text-muted {
    color: #666 !important;
}

.content-card .alert {
    color: inherit;
}

.pack-info {
    background: rgba(240, 240, 240, 0.8);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pack-info p {
    margin: 0.5rem 0;
    color: #333;
}

/* Login prompt styling */
.login-prompt {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    margin: 1rem 0;
}

/* All text in login prompt should be dark */
.login-prompt,
.login-prompt * {
    color: #333;
    text-shadow: none !important;
}

.login-icon {
    color: #666;
    margin-bottom: 1rem;
}

.login-prompt h3 {
    margin-bottom: 0.5rem;
}

.login-prompt p {
    color: #555;
    margin-bottom: 1.5rem;
}

/* Card images - single card per row, centered */
.card-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.card-image {
    width: 100%;
    max-width: 350px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

/* Card placeholders - single placeholder per row, centered */
.card-placeholders {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.card-placeholder {
    width: 100%;
    max-width: 350px;
    height: 350px;
    min-height: 350px;
    background-color: rgba(224, 224, 224, 0.8);
    border: 2px dashed rgba(170, 170, 170, 0.8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Loading spinner for cards */
.card-loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(170, 170, 170, 0.3);
    border-top-color: #555;
    border-radius: 50%;
    animation: card-spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes card-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Card loading state - replaces card image while loading */
.card-loading {
    width: 100%;
    max-width: 350px;
    height: 350px;
    min-height: 350px;
    background: linear-gradient(135deg, rgba(240, 240, 240, 0.95) 0%, rgba(220, 220, 220, 0.95) 100%);
    border: 2px dashed rgba(150, 150, 150, 0.6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Card image wrapper - simple layout */
.card-image-wrapper {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    padding: 2px;
    box-sizing: border-box;
}

.card-image-wrapper .card-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: block;
}

/* Make main content centered */
.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

/* Text over background image needs white color with shadow */
.main-content h1,
.main-content h2,
.main-content h3 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

/* Text inside content cards uses dark colors */
.content-card h1,
.content-card h2,
.content-card h3 {
    color: #333;
    text-shadow: none;
    background: transparent;
    padding: 0;
}

.main-content .content {
    width: 100%;
    max-width: 800px;
}

/* Improve footer transparency */
.app-footer {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(6px);
}

/* Make it nice when we apply per-page backgrounds */
.page-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Text overlay with semi-transparent background for visibility on images */
.text-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
    padding: 0.5rem 1.5rem !important;
    border-radius: 8px;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
    display: inline-block;
    margin: 1rem 0;
}

/* Button row - centered buttons in a row */
.button-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

/* Centered card display - ensures full centering */
.card-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
}

/* Content card centering fix */
.content-card {
    text-align: center;
}

.content-card .qr-scanner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Ensure card containers are centered */
.content-card .card-placeholders,
.content-card .card-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Pack info should also be centered */
.content-card .pack-info {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 500px;
}

/* Loading spinner component */
.loading-spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(170, 170, 170, 0.3);
    border-top-color: #555;
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.text-bg {
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(4px); 
    padding: 0.5rem 1.5rem; 
    border-radius: 8px;
    color: #fff; 
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    display: inline-block;
    margin: 1rem 0;
}

.loading-error {
    color: red;
    text-align: center;
    margin-top: 1rem;
}