/* Layout */
.app-container {
    width: 100%;
    max-width: 400px;
    /* Mobile width constraint */
    height: 90vh;
    max-height: 850px;
    margin: auto;
    /* Center on page */
    display: flex;
    flex-direction: column;
    background-color: #0F172A;
    /* Slate 900 */
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    /* Deep shadow + subtle border */
    overflow: hidden;
    /* Clip content */
    position: relative;
}

@media (max-width: 600px) {
    .app-container {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        position: fixed;
        /* Force fixed to viewport to avoid scroll/margin issues */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
    }

    body,
    html {
        margin: 0;
        padding: 0;
        background-color: #0F172A;
        /* Match bg to hide gaps */
        height: 100%;
        overflow: hidden;
        /* Let app-container handle scroll */
    }
}

/* Ensure body centers the app */
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Header */
.app-header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #1E293B;
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 1.25rem;
    flex-shrink: 0;
}

/* Utilities */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(79, 148, 205, 0.6);
    border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.8);
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

.w-full {
    width: 100%;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.flex-grow {
    flex-grow: 1;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-30 {
    z-index: 30;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

/* Spacing & Sizing Overrides for Compact Feel */
.p-6 {
    padding: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.25rem;
}

/* Reduced */
.mt-4 {
    margin-top: 1rem;
}

.ml-4 {
    margin-left: 0.75rem;
}

.space-y-4>*+* {
    margin-top: 0.75rem;
}

/* Tighter spacing */