/* Custom Extracted CSS for r9.by */

/* Chat Bot & Cookie Banner Styles */
#r9-bot-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #1e70e6 0%, #0d47a1 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    z-index: 1000001;
    box-shadow: 0 8px 25px rgba(30, 112, 230, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.3s;
}
#r9-bot-launcher:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 30px rgba(30, 112, 230, 0.45);
}
#r9-bot-launcher:active {
    transform: scale(0.98) translateY(0);
}
.r9-bot-launcher-icon-wrapper {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#r9-bot-window {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 380px;
    height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 1000001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.r9-bot-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
}
.r9-bot-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#r9-bot-header {
    background: linear-gradient(135deg, #1e70e6 0%, #0d47a1 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.r9-bot-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
}
.r9-status-dot {
    width: 9px;
    height: 9px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #2ecc71;
    animation: r9-pulse 2s infinite;
}
.r9-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}
.r9-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}
.r9-reset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
    transform: rotate(-180deg);
}

#r9-bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}
.r9-msg {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.r9-msg.r9-user {
    background: #1e70e6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 10px rgba(30, 112, 230, 0.15);
}
.r9-msg.r9-bot {
    background: #ffffff;
    color: #2c3e50;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.04);
}

.r9-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}
.r9-typing-dot {
    width: 6px;
    height: 6px;
    background: #7f8c8d;
    border-radius: 50%;
    animation: r9-bounce 1.4s infinite ease-in-out both;
}
.r9-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.r9-typing-dot:nth-child(2) { animation-delay: -0.16s; }

#r9-bot-input-container {
    display: flex;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px 15px;
    background: #fff;
    gap: 10px;
    align-items: center;
}
#r9-bot-user-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fdfdfd;
}
#r9-bot-user-input:focus {
    border-color: #1e70e6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 112, 230, 0.1);
}
#r9-bot-send-btn {
    background: #1e70e6;
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
    flex-shrink: 0;
}
#r9-bot-send-btn:hover {
    background: #0d47a1;
    transform: scale(1.05);
}
#r9-bot-send-btn:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    #r9-bot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
    #r9-bot-launcher {
        bottom: 15px;
        right: 15px;
    }
}

@keyframes r9-pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}
@keyframes r9-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.r9-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    padding: 16px 20px 22px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.r9-cookie-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.r9-cookie-card {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08), 0 18px 48px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.r9-cookie-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff7d6 0%, #ffe08a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.r9-cookie-body {
    flex: 1 1 320px;
    min-width: 0;
    text-align: left;
}

.r9-cookie-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.r9-cookie-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.r9-cookie-text a {
    color: #1e70e6;
    font-weight: 600;
    text-decoration: none;
}

.r9-cookie-text a:hover {
    text-decoration: underline;
}

.r9-cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.r9-cookie-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.r9-cookie-btn-accept {
    background: #1e70e6;
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 112, 230, 0.25);
}

.r9-cookie-btn-accept:hover {
    background: #0d47a1;
    transform: translateY(-1px);
}

.r9-cookie-btn-details {
    background: #0e2235;
    color: #334155;
}

.r9-cookie-btn-details:hover {
    background: #144079;
    color: #0f172a;
}

@media (max-width: 820px) {
    .r9-cookie-banner {
        padding: 12px 12px 16px;
    }

    .r9-cookie-card {
        flex-wrap: wrap;
        gap: 14px;
        padding: 16px 16px 18px;
        border-radius: 16px;
    }

    .r9-cookie-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .r9-cookie-body {
        flex: 1 1 calc(100% - 60px);
    }

    .r9-cookie-actions {
        width: 100%;
    }

    .r9-cookie-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .r9-cookie-actions {
        flex-direction: column;
    }

    .r9-cookie-btn {
        width: 100%;
    }
}

/* Universal Responsive Tags Container & Pill Link Styling */
.tags-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 12px !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto 30px auto !important;
    padding: 10px 0 !important;
    box-sizing: border-box !important;
}

.tag-link {
    display: inline-flex !important;
    align-items: center !important;
    font-family: var(--mono, "Space Mono", monospace, sans-serif) !important;
    font-size: 13px !important;
    background: #161a23 !important;
    border: 1px solid #262c38 !important;
    color: #cbd5e1 !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.tag-link:hover, .tag-link:focus {
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    background: #1e293b !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25) !important;
    transform: translateY(-1px) !important;
}

.tag-link.category-link {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

.tag-link.category-link:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .tags-container {
        gap: 8px 10px !important;
        padding: 5px 10px !important;
    }
    .tag-link {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}

/* Responsive CSS Grid for Tag Index Page (6 columns on desktop) */
.tags-grid-wrapper {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 1320px !important;
    margin: 0 auto 40px auto !important;
    box-sizing: border-box !important;
}

.tag-grid-card {
    display: flex !important;
    flex-direction: column !important;
    background: #161a23 !important;
    border: 1px solid #262c38 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
    height: 100% !important;
}

.tag-grid-card:hover, .tag-grid-card:focus {
    transform: translateY(-5px) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25) !important;
    text-decoration: none !important;
}

.tag-card-img-box {
    width: 100% !important;
    height: 115px !important;
    overflow: hidden !important;
    background: #0f172a !important;
    position: relative !important;
}

.tag-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease !important;
}

.tag-grid-card:hover .tag-card-img {
    transform: scale(1.06) !important;
}

.tag-card-body {
    padding: 12px 10px !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-grow: 1 !important;
    background: #161a23 !important;
}

.tag-card-title {
    color: #e2e8f0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    transition: color 0.2s ease !important;
    word-break: break-word !important;
}

.tag-grid-card:hover .tag-card-title {
    color: #3b82f6 !important;
}

/* Adaptive Breakpoints for CSS Grid */
@media (max-width: 1200px) {
    .tags-grid-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 992px) {
    .tags-grid-wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }
    .tag-card-img-box {
        height: 105px !important;
    }
}

@media (max-width: 640px) {
    .tags-grid-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .tag-card-img-box {
        height: 95px !important;
    }
    .tag-card-title {
        font-size: 13px !important;
    }
}

@media (max-width: 400px) {
    .tags-grid-wrapper {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 10px !important;
    }
}


