/* Basic reset and global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden; /* Prevents scrolling of the entire page */
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

body {
    background-color: #FFEAD0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main application container to constrain the layout */
.app-wrapper {
    width: 100%;
    max-width: 480px; /* Typical width for mobile apps */
    height: 100%;
    position: relative;
    background-color: #f7f7f7;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Floating header styles */
.header {
    position: absolute;
    top: 20px;
    left: 15px;
    right: 15px;
    z-index: 100;
    background-color: #f6babb; /* #E563995E */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.download-btn {
    background-color: rgba(255, 255, 255, 0.8);
    color: #444;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.download-btn:hover {
    background-color: white;
}

/* Card container now fills the parent, cards will appear behind header/footer */
.card-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed large top/bottom padding, added side padding */
    padding: 0 15px;
    background: #FFEAD0;
}

.card {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: #ccc; /* Fallback color to prevent seeing through */
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    cursor: grab;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    will-change: transform, opacity; /* Performance optimization */
}

.card:active {
    cursor: grabbing;
}

/* Remove transition during the drag for smoother movement */
.card.dragging {
    transition: none;
}

/* Gradient overlay for text readability */
.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%; /* Increased gradient height for better readability */
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    border-radius: 0 0 15px 15px;
}

/* Positioned card info block strictly above the controls */
.card-info {
    padding: 20px;
    color: white;
    position: absolute;
    bottom: 120px; /* NEW: Lifted above the controls */
    left: 0;
    right: 0;
    z-index: 10;
}

.card-name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.card-distance {
    font-size: 16px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Positioned activity indicator below the header */
.activity-indicator {
    position: absolute;
    top: 90px; /* NEW: Pushed down to be below the header */
    left: 15px;
    z-index: 15;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    backdrop-filter: blur(5px);
}

/* Control buttons at the bottom */
.controls {
    position: absolute;
    bottom: 40px; /* Adjusted for better spacing */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 25px;
    z-index: 50;
    transition: opacity 0.3s ease;
}

.control-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.control-btn:hover {
    transform: scale(1.1);
}

.dislike-btn {
    background-color: white;
    color: #ff6b6b;
}

.like-btn {
    background-color: white;
    color: #4ecdc4;
}

/* --- Promo Banner Styles (Shared by all banners) --- */
.promo-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.promo-banner-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.promo-banner-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.promo-banner-overlay.visible .promo-banner-content {
    transform: scale(1);
}

.promo-banner-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
}

.promo-banner-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 22px;
}

.promo-banner-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.promo-banner-download {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    font-size: 16px;
    width: 100%;
    margin-bottom: 15px;
}

.promo-banner-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.promo-banner-content small {
    color: #999;
    font-size: 12px;
}

/* Event Banner Specific Styles */
.event-banner-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: -10px auto 15px;
    border: 4px solid white;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    display: none; /* Hidden by default */
}

/* New styles for the final message */
.end-of-deck-message {
    text-align: center;
    color: #555;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.end-of-deck-message h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.end-of-deck-message p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 300px;
}
