/**
 * AZ Story Engine — Dashboard, gallery & reader styles.
 */

.az-slide-nsfw .az-slide-text-wrapper:not(.az-nsfw-revealed) .az-slide-text,
.az-slide-nsfw #az-staged-seed-text:not(.az-nsfw-revealed) {
    filter: blur(14px);
    user-select: none;
    pointer-events: none;
}
.az-nsfw-reveal-btn {
    position: absolute; z-index: 20; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(255,51,102,0.15); border: 1px solid #ff3366; color: #ff3366;
    padding: 10px 20px; border-radius: 20px; font-size: 12px; font-weight: 700; cursor: pointer;
}
		.az-archived-seeds-btn { border-color: rgba(138,148,166,0.4) !important; color: #8a94a6 !important; background: rgba(138,148,166,0.08) !important; }
#az-staged-seed-wrap blockquote.az-slide-text { font-size: 20px; opacity: 0.96; }
		.az-crowned-badge { position:absolute; top:8px; right:8px; background:rgba(255,215,0,0.92); color:#0b0e14; font-size:10px; font-weight:800; padding:3px 8px; border-radius:10px; z-index:5; letter-spacing:0.3px; }
        .az-v6-container { max-width: 1100px; margin: 30px auto; padding: 25px; background: #0b0e14; border: 1px solid #1f2430; border-radius: 16px; color: #e1e4ea; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
        .az-v6-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1f2430; padding-bottom: 20px; margin-bottom: 25px; }
        .az-v6-section-title { font-size: 18px; color: #fff; margin-bottom: 15px; }
        .az-v6-story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
        .az-v6-card { background: #121620; border: 1px solid #1f2430; border-radius: 12px; padding: 18px; position: relative; display: flex; flex-direction: column; }
        .az-v6-card-badge { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: bold; margin-bottom: 8px; align-self: flex-start; }
        .badge-genesis { background: rgba(0, 255, 136, 0.15); color: #00ff88; }
        .badge-branch { background: rgba(0, 170, 255, 0.15); color: #00aaff; }
        .az-v6-card-title { margin: 0 0 10px 0; color: #fff; font-size: 16px; }
        .az-v6-progress-bar-bg { background: #1f2430; height: 6px; border-radius: 3px; margin-bottom: 10px; overflow: hidden; }
        .az-v6-progress-bar-fill { height: 100%; background: #00ff88; border-radius: 3px; }
        .az-v6-card-meta { display: flex; justify-content: space-between; font-size: 11px; color: #8a94a6; }
        
        .az-carousel-viewport { overflow: hidden; position: relative; width: 100%; height: 420px; border-radius: 12px; background: #121620; border: 1px solid #1f2430; }
        .az-carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
        .az-slide { flex: 0 0 100%; width: 100%; height: 100%; box-sizing: border-box; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
        
        /* THEME-PROOF TEXT CENTERING */
        .az-slide-text-wrapper { padding: 20px 40px !important; text-align: center !important; max-width: 850px; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; overflow-y: auto; margin: 0 auto !important; }
        blockquote.az-slide-text { border: none !important; padding: 0 !important; margin: 0 auto !important; background: transparent !important; box-shadow: none !important; font-size: 24px; font-weight: 500; line-height: 1.6; color: #ffebc5; font-style: italic; word-wrap: break-word; overflow-wrap: break-word; user-select: text; white-space: pre-wrap; width: 100%; text-align: center !important; display: block !important; }
        .az-slide-text:before, .az-slide-text:after { content: none !important; display: none !important; } /* Strips theme quotation marks */
        
        .az-slide-credit { position: absolute; bottom: 20px; right: 20px; background: rgba(11, 14, 20, 0.85); backdrop-filter: blur(8px); padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; color: #00ff88; border: 1px solid rgba(255,255,255,0.08); z-index: 10; display: flex; align-items: center; gap: 8px; }
        .az-competing-seeds-btn {
            position: absolute; bottom: 20px; left: 20px; z-index: 12;
            background: rgba(0, 255, 136, 0.12); border: 1px solid rgba(0,255,136,0.45);
            color: #00ff88; font-size: 12px; font-weight: 600; padding: 7px 14px;
            border-radius: 20px; cursor: pointer; backdrop-filter: blur(8px);
            transition: all 0.2s;
        }
        .az-competing-seeds-btn:hover { background: rgba(0,255,136,0.25); transform: translateY(-1px); }
        .az-seed-submit-slide .az-slide-text-wrapper { justify-content: flex-start; padding-top: 40px !important; }
        .az-admin-controls { position: absolute; top: 10px; left: 10px; z-index: 99; display: flex; gap: 4px; align-items: center; }
        .az-admin-btn { background: #ff5c5c; color: #fff !important; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; }
        .az-admin-edit-btn { background: #00ff88; color: #0b0e14 !important; }
        .az-admin-nsfw-btn { background: #2a3140; color: #8a94a6 !important; font-size: 8px; font-weight: 800; border-radius: 12px !important; width: auto !important; height: 24px !important; padding: 0 8px !important; transition: all 0.2s; }
        .az-admin-nsfw-btn.active { background: #ff3366 !important; color: #fff !important; }
        .az-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; background: rgba(18, 22, 32, 0.8); border: 1px solid #1f2430; color: #fff; border-radius: 50%; cursor: pointer; z-index: 10; font-size: 20px; }
        .az-prev { left: 15px; } .az-next { right: 15px; }
        .az-btn { background: #00ff88; color: #0b0e14 !important; font-weight: 700; border: none; padding: 10px 20px; border-radius: 25px; font-size: 13px; cursor: pointer; display: inline-block; }
        .az-btn-sm { background: #1f2430; color: #00ff88 !important; font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 15px; border: 1px solid #2a3140; cursor: pointer; }
        .az-tip-sparks-btn { background: rgba(255,215,0,0.2); border: 1px solid #ffd700; color: #ffd700; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 12px; cursor: pointer; }
        
        /* Highlights & Underlines */
        .az-interactive-text { text-decoration: underline; text-decoration-color: #00ff88; text-decoration-thickness: 2px; text-decoration-style: dashed; cursor: pointer; font-weight: 700; }
        .az-directive-text { text-decoration: underline; text-decoration-color: #ff7700; text-decoration-thickness: 3px; text-decoration-style: dashed; cursor: pointer; color: #ff9933; font-weight: 700; transition: all 0.2s; }
        .az-directive-text:hover { background: rgba(255,119,0,0.2); }
        
        /* Dropdown View Modes */
        .az-mode-prose .az-interactive-text,
        .az-mode-prose .az-directive-text { text-decoration: none !important; font-weight: normal !important; color: inherit !important; cursor: text !important; pointer-events: none !important; }
        .az-mode-interpretations .az-directive-text { text-decoration: none !important; font-weight: normal !important; color: inherit !important; cursor: text !important; pointer-events: none !important; }
        .az-mode-directives .az-interactive-text { text-decoration: none !important; font-weight: normal !important; color: inherit !important; cursor: text !important; pointer-events: none !important; }

        /* Showcase Grid */
        .az-showcase-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 30px; }
        .az-showcase-slot { height: 130px; background: #121620; border: 1px dashed #2a3140; border-radius: 10px; overflow: hidden; position: relative; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
        .az-showcase-slot.empty:hover { border-color: #00ff88; background: #151a26; }
        .az-showcase-slot.occupied { border-style: solid; border-color: #00ff88; cursor: pointer; }
        .az-showcase-slot.occupied:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,255,136,0.15); }
        .az-slot-empty-trigger { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
        .az-slot-preview { width: 100%; height: 75px; background: #000; position: relative; }
        .az-slot-license-badge { position: absolute; top: 4px; left: 4px; font-size: 9px; font-weight: bold; padding: 2px 5px; border-radius: 4px; }
        .license-portfolio { background: #505a69; color: #fff; }
        .license-story { background: #00aaff; color: #0b0e14; }
        .license-commercial { background: #ffd700; color: #0b0e14; }
        .az-slot-meta { padding: 6px; font-size: 11px; }
        .az-slot-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
        .az-slot-tags { display: flex; gap: 4px; margin-top: 2px; }
        .az-tag-pill { font-size: 9px; color: #8a94a6; }
        .az-slot-del-btn { position: absolute; bottom: 4px; right: 4px; background: rgba(255,92,92,0.2); border: none; color: #ff5c5c; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }
        .az-slot-del-btn:hover { background: #ff5c5c; color: #fff; }

        .az-jobboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
        .az-job-card { background: #121620; border: 1px solid #2a3140; border-left: 4px solid #ff7700; border-radius: 8px; padding: 14px; }
        .az-job-media-badge { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
        .media-image { background: rgba(0,255,136,0.15); color: #00ff88; }
        .media-sound { background: rgba(0,170,255,0.15); color: #00aaff; }
        .media-video { background: rgba(255,92,92,0.15); color: #ff5c5c; }
        .media-text { background: rgba(255,215,0,0.15); color: #ffd700; }

        .az-gallery-scroll { display: flex; overflow-x: auto; gap: 15px; padding: 15px 0; scroll-snap-type: x mandatory; }
        .az-gallery-item { flex: 0 0 250px; scroll-snap-align: center; background: #0b0e14; border-radius: 12px; padding: 15px; text-align: center; border: 1px solid #1f2430; position: relative; }
        .az-gallery-img { width: 100%; height: 220px; object-fit: contain; background: #05070a; border-radius: 8px; margin-bottom: 10px; }
.az-gallery-video { width: 100%; height: 220px; object-fit: contain; border-radius: 8px; background: #000; display: block; }
        .az-gallery-audio-btn { width: 60px; height: 60px; border-radius: 50%; background: #00ff88; border: none; font-size: 24px; cursor: pointer; margin: 40px auto; display: flex; align-items: center; justify-content: center; }
        .az-gallery-author { font-size: 11px; color: #8a94a6; margin: 8px 0; }
        .az-like-btn { background: transparent; border: 1px solid #1f2430; color: #8a94a6; border-radius: 20px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
        .az-like-btn.liked { background: rgba(255, 92, 92, 0.1); border-color: #ff5c5c; color: #ff5c5c; }

        /* Floating Tooltip */
        #az-media-tooltip { display: none; position: fixed; background: #191e2b; padding: 6px 14px; border-radius: 30px; z-index: 10000; box-shadow: 0 8px 30px rgba(0,0,0,0.85); border: 1px solid #00ff88; gap: 8px; align-items: center; }
        .az-tooltip-btn { background: none; border: none; cursor: pointer; font-size: 18px; padding: 4px; transition: transform 0.2s; }
        .az-tooltip-btn:hover { transform: scale(1.2); }

        .az-v6-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(7, 9, 13, 0.85); backdrop-filter: blur(10px); z-index: 99999; justify-content: center; align-items: center; }
        .az-v6-modal-overlay.active { display: flex !important; }
        .az-v6-modal-content { background: #121620; border: 1px solid #1f2430; border-radius: 16px; padding: 30px; width: 100%; max-width: 480px; position: relative; }
        .az-v6-modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; color: #8a94a6; font-size: 22px; cursor: pointer; }
        .az-v6-input-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
        .az-v6-input-field { background: #0b0e14; border: 1px solid #1f2430; border-radius: 8px; padding: 10px 12px; color: #fff; font-size: 13px; width: 100%; box-sizing: border-box; }
        @media (max-width: 768px) { .az-showcase-grid { grid-template-columns: repeat(3, 1fr); } }

        /* =========================================================
           APPEARANCE MODES: Default / Full Transparency / Glass
           Controlled by body[data-az-theme]
           ========================================================= */
        :root {
            --az-bg: #0b0e14;
            --az-card: #121620;
            --az-border: #1f2430;
            --az-text: #e1e4ea;
            --az-muted: #8a94a6;
            --az-accent: #00ff88;
            --az-blur: 0px;
            --az-card-opacity: 1;
        }

        body[data-az-theme="transparent"] {
            --az-bg: transparent;
            --az-card: rgba(18, 22, 32, 0.35);
            --az-border: rgba(255,255,255,0.08);
            --az-card-opacity: 0.55;
            --az-blur: 0px;
        }

        body[data-az-theme="glass"] {
            --az-bg: transparent;
            --az-card: rgba(18, 22, 32, 0.45);
            --az-border: rgba(255,255,255,0.12);
            --az-card-opacity: 0.7;
            --az-blur: 16px;
        }

        body[data-az-theme="transparent"] .az-v6-container,
        body[data-az-theme="glass"] .az-v6-container {
            background: var(--az-card);
            border-color: var(--az-border);
            backdrop-filter: blur(var(--az-blur));
            -webkit-backdrop-filter: blur(var(--az-blur));
        }

        body[data-az-theme="transparent"] .az-v6-card,
        body[data-az-theme="glass"] .az-v6-card,
        body[data-az-theme="transparent"] .az-v6-modal-content,
        body[data-az-theme="glass"] .az-v6-modal-content {
            background: var(--az-card);
            border-color: var(--az-border);
            backdrop-filter: blur(var(--az-blur));
            -webkit-backdrop-filter: blur(var(--az-blur));
        }

        body[data-az-theme="transparent"] .az-carousel-viewport,
        body[data-az-theme="glass"] .az-carousel-viewport {
            background: var(--az-card);
            border-color: var(--az-border);
            backdrop-filter: blur(var(--az-blur));
        }

    </style>
