/**
 * Trivia Deck Page Styles
 * Extracted from inline styles for browser caching
 */

/* Full page black background */
html, body {
    background: #000 !important;
    margin: 0;
    padding: 0;
    padding-top: 0 !important;
    overflow: hidden;
    height: 100%;
}

/* Trivia Deck Container */
.trivia-deck-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
}

/* Card Frame */
.trivia-deck-frame {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 100vh;
    background: #1a1a2e;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .trivia-deck-frame {
        max-height: 90vh;
        border-radius: 24px;
        border: 3px solid rgba(255, 215, 0, 0.4);
    }
}

/* Background Image */
.trivia-deck-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* YouTube Background */
.trivia-youtube-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: transparent;
}

.trivia-youtube-bg #deckYoutubePlayer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Hide YouTube loading spinner */
.trivia-youtube-bg iframe {
    background: transparent !important;
}

.trivia-youtube-bg .yt-player-wrapper iframe {
    width: 100%;
    height: 100%;
}

/* Gradient Overlay */
.trivia-deck-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.8) 0%, 
        rgba(0,0,0,0.2) 20%, 
        rgba(0,0,0,0.1) 40%, 
        rgba(0,0,0,0.6) 70%, 
        rgba(0,0,0,0.95) 100%);
    z-index: 1;
}

/* Close/Back Button */
.trivia-back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.trivia-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
}

/* Top Center Card Count */
.trivia-top-count {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 22px;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.95rem;
}

.trivia-top-count i {
    color: #ffd700;
}

/* Language Switcher */
.trivia-lang-dropdown {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.trivia-lang-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.trivia-lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.trivia-lang-flag {
    font-size: 1.25rem;
    line-height: 1;
}

.trivia-lang-flag img.emoji,
.trivia-lang-btn img.emoji {
    width: 1.4em;
    height: 1.4em;
    vertical-align: middle;
}

.trivia-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: rgba(20, 20, 25, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.trivia-lang-dropdown.open .trivia-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.trivia-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.trivia-lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.trivia-lang-option.active {
    background: rgba(233, 30, 140, 0.2);
    color: #fff;
}

.trivia-lang-option .bi-check2 {
    margin-left: auto;
    color: #00e676;
}

.trivia-lang-name {
    flex: 1;
}

/* Content Area */
.trivia-deck-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 70px 20px 20px;
}

/* Header Section */
.trivia-deck-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 0;
}

.trivia-deck-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
    text-transform: uppercase;
    line-height: 1;
}

.trivia-deck-subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}

/* Cards Grid */
.trivia-cards-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.trivia-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trivia-card-item {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.trivia-card-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(233, 30, 140, 0.4);
}

.trivia-card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trivia-card-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.trivia-card-item-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.trivia-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a4a, #1a1a2e);
}

.trivia-card-placeholder i {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.3);
}

/* Bottom Action Buttons */
.trivia-deck-bottom {
    padding: 15px 0 10px;
    flex-shrink: 0;
    display: flex;
    gap: 12px;
}

.trivia-browse-btn {
    flex: 1;
    background: linear-gradient(135deg, #e91e8c, #c026d3);
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 14px;
    padding: 14px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Fredoka', sans-serif;
}

.trivia-browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 30, 140, 0.4);
    color: #fff;
}

/* App Store Modal */
.app-store-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.app-store-modal.active {
    opacity: 1;
    visibility: visible;
}

.app-store-content {
    background: #fff;
    font-family: 'Fredoka', sans-serif;
    border-radius: 20px;
    padding: 30px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.app-store-content h3 {
    margin: 0 0 10px;
    color: #1a1a2e;
    font-size: 1.4rem;
}

.app-store-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.app-store-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.app-store-buttons .app-store-link {
    flex: 1;
    flex-direction: column;
    padding: 12px 8px;
    font-size: 0.75rem;
    gap: 6px;
}

.app-store-buttons .app-store-link i {
    font-size: 1.5rem;
}

.app-store-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    background: linear-gradient(135deg, #e91e8c, #c026d3);
    color: #fff;
    border: none;
}

.app-store-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    color: #fff;
}

.app-store-close {
    margin-top: 15px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: 'Fredoka', sans-serif;
}

.app-store-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Deck Spacer */
.trivia-deck-spacer {
    flex: 1;
}

/* Cards Modal */
.cards-modal-content {
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.cards-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 5px;
}

.cards-modal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    background: transparent;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.cards-modal-item:hover {
    background: rgba(233, 30, 140, 0.1);
}

.cards-modal-item img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.cards-modal-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cards-modal-placeholder i {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.7);
}

.cards-modal-title {
    color: #333;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}
