/* Consolidated styles from style.css, extras.css, and assets/extras.css */

/* General and Body Styles from style.css */
body {
    font-family: sans-serif;
    background-color: #111;
    color: #eee;
    text-align: center;
    padding: 50px;
    background: url('/assets/rideyourdemons_bg_alt_1080.jpg') no-repeat center center fixed;
    /* Placeholder image */
    background-size: cover;
    font-family: 'Inter', sans-serif;
    /* Default font for body text */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    display: flex;
    /* For main layout with toolbar */
    flex-direction: row;
    /* Default for desktop: toolbar on left */
    min-height: 100vh;
    /* Ensure body takes full viewport height */
}

/* Add media query for mobile responsiveness */
@media (max-width: 768px) {
    body {
        flex-direction: column; /* Stack content vertically on small screens */
    }

    body > main {
        margin-left: 0; /* Remove left margin for main content */
        width: 100%; /* Take full width */
        padding: 10px; /* Adjust padding for smaller screens */
    }

    #mainToolbar {
        display: none; /* Hide the fixed toolbar on small screens */
    }

    #loginUserIcon {
        position: absolute; /* Change to absolute to flow with content */
        top: 10px; /* Adjust position */
        right: 10px; /* Adjust position */
    }

    .cta-button {
        width: 95%; /* Make CTA buttons wider on small screens */
        max-width: none; /* Remove max-width constraint */
    }

    .tool-grid {
        grid-template-columns: 1fr; /* Force single column for tool blocks on small screens */
    }

    .disclaimer-popup {
        padding: 1rem; /* Adjust padding for smaller screens */
    }

    .disclaimer-popup h2 {
        font-size: 1.5rem; /* Adjust font size for smaller screens */
    }

    .disclaimer-popup p {
        font-size: 0.9rem; /* Adjust font size for smaller screens */
    }

    .chat-stream-section {
        padding: 1rem; /* Adjust padding for smaller screens */
    }

    .footer-section {
        padding: 1rem; /* Adjust padding for smaller screens */
    }
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-top: 50%; /* 3:2 aspect ratio (height/width) */
    overflow: hidden;
}

.chat-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    overflow: auto
}

/* Overlay for background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    /* Minimal transparency */
    z-index: -1;
}

/* Custom scrollbar for a sleek look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Container for general content (if used) */
.container {
    max-width: 500px;
    margin: auto;
    padding: 30px;
    background: #222;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Base input and button styles (overridden by specific classes) */
input,
button {
    width: 100%;
    margin: 15px 0;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

button {
    background-color: #444;
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #666;
}

/* Ensure html and body take full viewport height for sticky footer */
html,
body {
    height: 100%;
}

/* Header, section, footer base padding and text alignment */
header,
section,
footer {
    padding: 1.5rem;
    text-align: center;
}

/* Headings using Orbitron font */
h1,
h2,
h3 {
    font-family: 'Orbitron', sans-serif;
}

/* Base styles for all custom buttons (CTA, Tool, Nav) */
.button-base {
    display: inline-block;
    font-weight: bold;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    border: 2px solid #ff6a00;
    background: radial-gradient(circle at top left, #ff4d00, #ff0000, #cc0000);
    background-size: 250% 250%;
    animation: flame-flicker 1.5s infinite alternate, glow-pulse 3s infinite ease-in-out;
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.75), inset 0 0 10px rgba(255, 140, 0, 0.5);
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease;
    cursor: pointer;
}

.button-base:hover {
    transform: scale(1.58);
    box-shadow: 0 0 40px rgba(255, 150, 0, 1), inset 0 0 20px rgba(255, 90, 0, 0.9);
}

/* Specific styles for large Call-to-Action buttons within sections */
.cta-button {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    width: 80%;
    max-width: 250px;
    margin: 0.5rem;
}

/* Specific styles for header/sidebar navigation buttons */
.header-nav-button {
    padding: 0.5rem 0.75rem;
    /* Smaller padding */
    font-size: 0.8rem;
    /* Smaller font size */
    width: auto;
    /* Allow content to dictate width */
    max-width: none;
    /* No max width constraint */
    margin: 0.25rem;
    /* Smaller margin for compact layout */
}

/* Keyframe animations */
@keyframes flame-flicker {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 60, 0, 0.6), inset 0 0 5px rgba(255, 80, 0, 0.5);
    }

    100% {
        box-shadow: 0 0 25px rgba(255, 100, 0, 0.85), inset 0 0 15px rgba(255, 140, 0, 0.9);
    }
}

/* Styles for the new fixed toolbar */
#mainToolbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 180px;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.5);
    padding: 20px 0;
    display: flex; /* Change to flex for desktop */
    flex-direction: column;
    align-items: stretch;
    z-index: 99;
    overflow-y: auto;
    overflow-wrap: break-word;
}

#hamburgerButton {
    display: none; /* Hidden by default on desktop */
}

#mainToolbar .toolbar-link {
    display: block;
    width: 80%;
    padding: 15px 10px;
    color: #ccc;
    text-decoration: none;
    text-align: center;
    font-size: 0.8rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#mainToolbar .toolbar-link:last-child {
    border-bottom: solid;
}

#mainToolbar .toolbar-link:hover {
    background-color: rgba(42, 42, 42, 0.5);
    /* Semi-transparent hover */
    color: #fff;
    font-size: 1.0rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#mainToolbar .toolbar-link.active {
    background-color: #ff2e2e;
    color: #fff;
    font-weight: bold;
}

/* Mobile responsiveness for toolbar */
@media (max-width: 768px) {
    #mainToolbar {
        position: fixed; /* Keep fixed for overlay effect */
        top: 0;
        left: 0;
        width: 100%; /* Full width on mobile */
        height: 100%; /* Full height on mobile */
        background-color: rgba(26, 26, 26, 0.9); /* Darker overlay when open */
        transform: translateX(-100%); /* Hide off-screen by default */
        transition: transform 0.3s ease-in-out; /* Smooth transition */
        display: flex; /* Ensure flex for column layout when active */
        flex-direction: column;
        justify-content: center; /* Center content vertically */
        align-items: center; /* Center content horizontally */
        padding: 0; /* Remove padding for full screen */
    }

    #mainToolbar.is-active { /* This class is toggled by toolbar.js */
        transform: translateX(0); /* Slide in when active */
    }

    #hamburgerButton {
        display: block; /* Show hamburger button on mobile */
        position: fixed; /* Keep hamburger button fixed */
        top: 10px;
        left: 10px;
        z-index: 1000; /* Ensure it's above other content */
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

    .toolbar-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .toolbar-nav li {
        margin: 10px 0;
    }

    .toolbar-link {
        font-size: 1.2rem; /* Larger font size for mobile links */
        padding: 15px 0;
        width: 100%;
    }
}

/* Adjust main content to make space for the toolbar */
body>main {
    margin-left: 180px;
    padding: 20px;
    box-sizing: border-box;
    width: calc(100% - 180px);
    flex-grow: 1;
    /* Allow main content to take remaining space */
    display: flex;
    /* Make main a flex container */
    flex-direction: column;
    /* Stack its children vertically */
    min-height: 100%;
    /* Ensure main takes at least 100% of its parent's height */
}

/* Header styling to maintain its opacity and position, complementing global styles */
header {
    background-color: rgba(26, 26, 26, 0.3);
    /* Semi-transparent background */
    border-radius: 8px;
    position: relative;
    /* For login icon positioning */
    overflow: hidden;
    /* Ensure no overflow from absolute elements */
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3rem;
    color: #ff2e2e;
    margin-bottom: 10px;
}

header .tagline {
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 20px;
}

/* Styles for the Login/User Icon */
#loginUserIcon {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #ff2e2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 100;
    flex-direction: column;
    text-decoration: none;
}

#loginUserIcon:hover {
    background-color: #ff1a1a;
    transform: scale(1.05);
}

#loginUserIcon.logged-in {
    background-color: #4CAF50;
    font-size: 0.8rem;
    padding: 5px;
    width: auto;
    height: auto;
    border-radius: 8px;
}

#loginUserIcon .icon {
    display: block;
}

#loginUserIcon .user-name {
    font-size: 0.7rem;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

/* Floating Telegram Button */
.telegram-float-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: #0088cc;
    /* Telegram blue */
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.telegram-float-button:hover {
    transform: scale(1.1);
    background-color: #007bb5;
}

/* Disclaimer Overlay */
.disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Darker overlay for better contrast */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.disclaimer-overlay.show {
    opacity: 1;
    visibility: visible;
}

.disclaimer-popup {
    background: #1a1a1a;
    color: #f0f0f0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.disclaimer-overlay.show .disclaimer-popup {
    transform: scale(1);
}

.disclaimer-popup h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ffcc00;
}

.disclaimer-popup p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.disclaimer-close-button {
    background: #ff4d00;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out;
}

.disclaimer-close-button:hover {
    background: #cc0000;
}

/* Custom Message Box Styles */
.message-box-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    /* Higher than disclaimer */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.message-box-overlay.show {
    opacity: 1;
    visibility: visible;
}

.message-box-content {
    background: #1a1a1a;
    color: #f0f0f0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.message-box-overlay.show .message-box-content {
    transform: scale(1);
}

.message-box-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ffcc00;
}

.message-box-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.message-box-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.message-box-button {
    background: #ff4d00;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out;
}

.message-box-button:hover {
    background-color: #cc0000;
}

.message-box-content input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #eee;
    font-size: 1rem;
}

/* Live Chat Stream Section */
.chat-stream-section {
    background: #0f0f0f;
    color: white;
    padding: 2rem;
    border-top: 1px solid #333;
    margin-top: 4rem;
    /* Space from previous section */
    border-radius: 0.75rem;
    /* Rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    /* Shadow for depth */
}

.chat-stream-section h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #ffcc00;
    /* Yellowish color for heading */
    text-shadow: 0 0 10px rgba(255, 100, 0, 0.5);
    /* Text glow */
}

.chat-stream-box {
    background: #1a1a1a;
    border-radius: 0.75rem;
    padding: 1rem;
    max-height: 10rem;
    /* Fixed height for scrollable chat */
    overflow-y: auto;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
    /* Inner shadow for depth */
    border: 1px solid #444;
}

.chat-message {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.chat-message:last-child {
    margin-bottom: 0;
}

.chat-message .username {
    font-weight: bold;
    margin-right: 0.5rem;
}

.chat-message .RYD-Agent {
    color: #81e6d9;
    /* Tailwind teal-300 */
}

.chat-message .user {
    color: #cbd5e0;
    /* Tailwind slate-300 */
}

/* Chat input and button styling */
.chat-input-area {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chat-input-area input {
    flex-grow: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #555;
    background-color: #333;
    color: #eee;
    font-size: 1rem;
}

.chat-input-area button {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    background-color: #ff4d00;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out;
}

.chat-input-area button:hover {
    background-color: #cc0000;
}

/* Tool Blocks Section */
.tool-blocks-section {
    background: #1a1a1a;
    /* This specific section background */
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    margin-top: 4rem;
    /* Space from previous section */
}

.tool-blocks-section h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 100, 0, 0.5);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.tool-block {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 100, 0, .3);
    /* Orange border for the tools */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-block h3 {
    margin-bottom: 1rem;
    color: #ff8c00;
    font-weight: bold;
    font-size: 1.25rem;
}

.tool-block p {
    font-size: 0.9rem;
    color: #ccc;
    flex-grow: 1;
}

.tool-block .launch-button {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    max-width: none;
    width: auto;
    border-radius: 8px;
}

/* General Layout and Responsive Design */
.ryd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px
}

.ryd-list {
    display: block;
}

.ryd-tool {
    margin-bottom: 2rem;
    display: block;
    margin: 0 0 18px 0;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 100, 0, 0.18);
    background: rgba(0, 0, 0, 0.2);
    /* Add space between tools */
}


.ryd-tool h3 {
    margin: .2rem 0 .4rem 0;
    color: #ff8c00;
    font-weight: 700
}

.ryd-tool .meta,
.ryd-tool .cite {
    margin-top: .5rem;
    opacity: .9
}

.ryd-query {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    margin: 0 0 12px 0
        /* Add space after the query */
}

.ryd-section {
    margin: 20px 0;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 100, 0, 0.25);
    background: rgba(0, 0, 0, 0.25)
}

.ryd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px
}
/* Footer specific styles */
.footer-section {
  background: #0a0a0a; /* Very dark background */
  color: #bbb;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
  border-top: 1px solid #222;
  /* Removed margin-top: 4rem; to rely on mt-auto in HTML */
}

.footer-section h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffcc00;
  margin-bottom: 1rem;
}

.footer-section p {
  margin-bottom: 1rem;
}

.footer-section .patreon-button {
  display: inline-block;
  background-color: #FF424D; /* Patreon red */
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  margin-top: 1rem;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease;
}

.footer-section .patreon-button:hover {
  background-color: #e63c45;
  transform: translateY(-2px);
}

.footer-links a {
  color: #ff7e00; /* Orange for links */
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s ease-in-out;
}

.footer-links a:hover {
  color: #ffae42;
  text-decoration: underline;
}