/**
 * Captain Club Integration Plugin - Combined Stylesheet
 *
 * This stylesheet combines existing styles for front-end features
 * with a new, enhanced design for the admin view.
 */

/* --- Front-End Shop and Profile Styles --- */

/* Centering the button and shop items */
#button-container { text-align: center; margin-top: 20px; margin-bottom: 20px; }
#shop-container { text-align: center; margin-top: 20px; }
#shop-container p { margin: 0 auto; }

/* Wrapper for shortcode content */
.captain-club-content-wrapper { position: relative; z-index: 1; }
/* Faded Background Image */
body.page-id-516::before,
body.page-template-captain-club::before { content: ""; position: fixed; top: 50px; height: calc(100vh - 50px); left: 0; width: 100vw; z-index: -1; background-image: url('/assets/images/login-icon.png'); background-repeat: no-repeat; background-position: center center; background-size: contain; opacity: 0.25; pointer-events: none; }
/* Captain Club pages (standalone) faded background */
.captain-club-content-wrapper::before { content: ""; position: fixed; top: 60px; height: calc(100vh - 60px); left: 0; width: 100vw; z-index: -1; background-image: url('/assets/images/login-icon.png'); background-repeat: no-repeat; background-position: center center; background-size: contain; opacity: 0.12; pointer-events: none; }
/* End Faded Background */

/* Intro Text Styling */
.cc-intro-text { text-align: center; margin: 10px auto 15px auto; max-width: 700px; padding: 0 15px; color: #ccc; font-size: 1em; font-style: italic; line-height: 1.6; }
.cc-intro-text p { margin-bottom: 0.5em; }
.cc-info-links { margin-top: 15px; font-size: 0.9em; }
.cc-info-links a { color: #aaa; text-decoration: underline; padding: 0 5px; }
.cc-info-links a:hover { color: #fff; }
/* End Intro Text Styling */

/* Testimonial Styling */
.cc-testimonial { text-align: center; margin: 20px auto 30px auto; max-width: 600px; padding: 0 15px; font-style: normal; color: #7289da; font-weight: bold; font-size: 1em; line-height: 1.5; }
.cc-testimonial br { display: block; content: ""; margin-top: 0.3em; }
/* End Testimonial Styling */

/* Page Title & Welcome Message Styling */
body .cc-page-title { text-align: center; margin-top: 40px; margin-bottom: 20px; font-family: 'American Captain', sans-serif; font-size: 2.2em; color: #15202b; font-weight: 700; letter-spacing: -0.5px; text-shadow: none; }
.cc-welcome-greeting { text-align: center; font-size: 1.1em; color: #bbb; margin-top: -15px; margin-bottom: 20px; }
.cc-welcome-username { color: #FFD700; font-weight: bold; }
/* End Title Styling */

/* Profile Info Box Styling */
.cc-profile-info-box { border: 1px solid #444; background-color: rgba(40, 40, 40, 0.8); color: #eee; padding: 20px; margin: 20px auto 10px auto; max-width: 700px; border-radius: 8px; }
.cc-profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px 20px; }
.cc-profile-datapoint { font-size: 1em; line-height: 1.4; text-align: center; }
.cc-profile-label { display: block; font-size: 0.9em; color: #fff; font-weight: bold; margin-bottom: 3px; }
.cc-profile-value { display: block; font-weight: bold; color: #fff; word-wrap: break-word; }
.cc-profile-value.bucks-value { color: #FFD700; }
.cc-profile-value.twitch-bucks-value { color: #28a745; }
.cc-profile-value.twitch-bucks-zero { color: #aaa; font-weight: normal; }
.cc-profile-disclaimer { text-align: center; margin-top: 15px; margin-bottom: 15px; font-size: 0.9em; font-style: italic; color: #dc3232; }
@media (max-width: 550px) { .cc-profile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .cc-profile-grid { grid-template-columns: 1fr; gap: 10px; } .cc-profile-datapoint { text-align: left; } .cc-profile-label { display: inline-block; margin-right: 5px; margin-bottom: 0; min-width: 80px; } .cc-profile-value { display: inline; } }
/* End Profile Info Box Styling */

/* Static Explanation Table Styling */
.cc-profile-explanations-wrapper { margin: 0 auto 30px auto; max-width: 700px; padding: 0 10px; }
.cc-profile-explanations-title { font-size: 1.2em; text-align: center; color: #ddd; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px dashed #555; }
.cc-profile-explanations-table { width: 100%; border-collapse: collapse; color: #ccc; font-size: 0.95em; border-radius: 4px; overflow: hidden; }
.cc-profile-explanations-table th, .cc-profile-explanations-table td { border: none; padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.cc-profile-explanations-table tbody tr:last-child th, .cc-profile-explanations-table tbody tr:last-child td { border-bottom: none; }
.cc-profile-explanations-table th { font-weight: bold; width: 30%; color: #fff; background-color: rgba(60, 60, 60, 0.5); }
.cc-profile-explanations-table td { width: 70%; line-height: 1.5; }
.cc-profile-explanations-table tbody tr:nth-child(odd) td { background-color: rgba(60, 60, 60, 0.7); }
.cc-profile-explanations-table tbody tr:nth-child(even) td { background-color: rgba(45, 45, 45, 0.7); }
.cc-profile-explanations-table tbody tr:nth-child(odd) th { background-color: rgba(60, 60, 60, 0.7); }
.cc-profile-explanations-table tbody tr:nth-child(even) th { background-color: rgba(45, 45, 45, 0.7); }
.cc-profile-explanations-table td a { color: #8ab4f8; text-decoration: underline; }
.cc-profile-explanations-table td a:hover { color: #b3ceff; }
/* End Explanation Table Styling */

/* Shop Disclaimer & Timestamp Styling */
.shop-cache-disclaimer, .shop-last-refreshed, .next-restock-date { text-align: center; font-size: 0.9em; color: #555; margin-bottom: 5px; margin-top: 0; max-width: 80%; margin-left: auto; margin-right: auto; }
.shop-cache-disclaimer { margin-bottom: 10px; font-style: italic; }
.shop-cache-disclaimer a { color: #7289da; text-decoration: none; }
.shop-cache-disclaimer a:hover { text-decoration: underline; }
.timezone-tooltip { display: inline-block; margin-left: 4px; cursor: help; border: 1px solid #ccc; border-radius: 50%; width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 11px; color: #777; background-color: #f0f0f0; }
.timezone-tooltip:hover { background-color: #e0e0e0; border-color: #aaa; }
/* End Disclaimer/Timestamp Styling */

/* Styling the shop gallery */
.shop-gallery { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 20px; box-sizing: border-box; margin-top: 15px; max-width: 1100px; margin-left: auto; margin-right: auto; }
.shop-item { background-color: #f5f5f5; border: 1px solid #ddd; border-radius: 10px; padding: 0; width: calc(25% - 15px); max-width: none; aspect-ratio: 3 / 4; text-align: center; position: relative; overflow: hidden; box-sizing: border-box; flex-grow: 0; flex-shrink: 0; transition: filter 0.3s ease, opacity 0.3s ease; }
.shop-item img.shop-cover-image { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.shop-item img.shop-cover-image[src$='placeholder-cover.png'] { object-fit: contain; background-color: #eee; }
.shop-item-no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3em; color: #ccc; background-color: #eee; }
@media (max-width: 992px) { .shop-gallery { gap: 15px; } .shop-item { width: calc(100% / 3 - 10px); max-width: none; } }
@media (max-width: 768px) { .shop-item { width: calc(50% - 8px); } }
@media (max-width: 480px) { .shop-gallery { padding: 10px; gap: 10px; } .shop-item { width: calc(50% - 5px); max-width: none; } }

/* Shop item overlays */
.shop-item .pb-cost { position: absolute; bottom: 10px; right: 10px; font-weight: bold; font-size: 14px; color: #fff; background-color: rgba(0, 0, 0, 0.6); padding: 3px 6px; border-radius: 5px; z-index: 2; }
.shop-item-quantity { position: absolute; bottom: 10px; left: 10px; font-weight: bold; font-size: 14px; color: #fff; background-color: rgba(0, 0, 0, 0.6); padding: 3px 6px; border-radius: 5px; z-index: 2; }
.shop-item .platform-logo { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; background-color: #000; border-radius: 50%; padding: 2px; box-sizing: border-box; z-index: 2; display: block; object-fit: contain; }
.shop-item.affordable { border: 2px solid #00FF00; }
/* End Overlays */

/* Upcoming Item Styling */
.upcoming-shop-title { text-align: center; margin-top: 30px; margin-bottom: 5px; font-size: 1.5em; color: #444; }
.shop-item.upcoming-shop-item { opacity: 0.65; filter: grayscale(80%); }
hr.shop-section-divider { border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0)); margin: 40px 10%; }
/* End Upcoming Item Styling */

/* Cooldown Styling for CURRENT items */
.shop-item.shop-item-cooldown { opacity: 0.7; filter: grayscale(60%); cursor: not-allowed; }
.cooldown-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(30, 30, 30, 0.75); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 3; padding: 10px; box-sizing: border-box; border-radius: 10px; text-align: center; pointer-events: auto; cursor: not-allowed; }
.lock-icon { font-size: 2.5em; color: rgba(255, 255, 255, 0.8); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); display: block; }
.cooldown-text { font-size: 0.9em; color: #eee; font-weight: bold; margin-top: 5px; line-height: 1.3; }
/* End Cooldown Styling */

/* Base button styling */
.discord-button { display: inline-block; padding: 10px 20px; font-size: 18px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-weight: 600; border: none; border-radius: 8px; background-color: #7289da; color: #fff; text-decoration: none; transition: background-color 0.3s ease; cursor: pointer; line-height: normal; }
.discord-button:hover { background-color: #5b6eae; }

/* User Widget (Logged In) */
#cc-user-widget { position: fixed !important; top: 25px !important; right: 25px !important; /* Desktop */ bottom: auto !important; left: auto !important; width: auto !important; max-width: 400px; z-index: 10001; background-color: rgba(0, 0, 0, 0.7); color: #fff; padding: 5px 10px; border-radius: 8px; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.cc-widget-content { display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; }
.cc-expiry-info { font-size: 13px; margin-right: 6px; opacity: 0.9; line-height: 32px; color: #fff; }
.cc-expiry-info:hover { opacity: 1; }
.cc-divider { margin: 0 6px; color: #aaa; font-size: 14px; line-height: 32px; }
.cc-bucks-balance { margin-left: 6px; font-size: 14px; font-weight: bold; line-height: 32px; color: #FFD700; }
.cc-avatar { width: 32px; height: 32px; border-radius: 50%; display: block; margin-left: 8px; object-fit: cover; }
.cc-dropdown { display: none; position: absolute; top: calc(100% + 5px); right: 0; background-color: #333; color: #fff; border-radius: 5px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); min-width: 160px; z-index: 10002; }
.cc-dropdown ul { list-style: none; margin: 0; padding: 5px 0; }
.cc-dropdown li a { display: block; padding: 8px 15px; color: #fff; text-decoration: none; font-size: 14px; white-space: nowrap; }
.cc-dropdown li a:hover { background-color: #555; }
.cc-dropdown-divider hr { border: none; border-top: 1px solid #555; margin: 5px 0; }
/* End Widget Styles */

/* Header Login Button Styling */
#cc-header-login-button { position: fixed !important; top: 15px !important; /* Mobile */ right: 15px !important; bottom: auto !important; left: auto !important; z-index: 10000; padding: 8px 16px; font-size: 16px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: background-color 0.2s ease, transform 0.2s ease; line-height: normal; white-space: nowrap; }
#cc-header-login-button:hover { transform: scale(1.05); }
/* End Header Login Button Styles */

/* Media Query for Desktop Positioning */
@media (min-width: 769px) { #cc-user-widget, #cc-header-login-button { top: 25px !important; right: 25px !important; } }
/* End Media Query */

/* Login Error Notice Styling */
.cc-error-notice { border: 1px solid #dc3232; background-color: #fef2f2; color: #dc3232; padding: 10px 15px; margin: 15px auto; max-width: 600px; border-radius: 4px; text-align: center; font-weight: bold; }
/* End Error Notice Styling */

/* Shop Loading Indicator */
.shop-loading { text-align: center; padding: 40px 15px; font-size: 1.1em; color: #777; font-style: italic; }
.shop-loading::before { content: ""; display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(100, 100, 100, 0.3); border-radius: 50%; border-top-color: #666; animation: shop-spin 1s ease-in-out infinite; -webkit-animation: shop-spin 1s ease-in-out infinite; margin-right: 10px; vertical-align: middle; position: relative; top: -2px; }
@keyframes shop-spin { to { -webkit-transform: rotate(360deg); } }
@-webkit-keyframes shop-spin { to { -webkit-transform: rotate(360deg); } }
/* End Loading Indicator */

/* --- Community Page Styling --- */
.cc-page-subtitle { text-align: center; font-size: 1.6em; font-weight: 700; color: #15202b; margin: 10px auto 20px; position: relative; }
.cc-page-subtitle::after { content: ""; display: block; width: 120px; height: 4px; border-radius: 2px; margin: 10px auto 0; background: linear-gradient(90deg, #00c6ff, #0072ff); }

/* Main Community Banner Gallery */
.community-banner-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 20px 10px; max-width: 900px; margin: 20px auto; }
.community-banner-item { display: block; position: relative; border-radius: 10px; overflow: hidden; background-color: #333; text-decoration: none; color: white; box-shadow: 0 4px 8px rgba(0,0,0,0.2); transition: transform 0.3s ease, box-shadow 0.3s ease; aspect-ratio: 2 / 1; }
.community-banner-item:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.3); }
.community-banner-image { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.3s ease; }
.community-banner-item:hover .community-banner-image { transform: scale(1.05); }

.community-banner-item.is-disabled { cursor: not-allowed; filter: grayscale(50%); opacity: 0.7; pointer-events: none; }
.community-banner-item.is-disabled:hover { transform: none; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.community-banner-item.is-disabled:hover .community-banner-image { transform: none; }

@media (max-width: 540px) {
  .community-banner-gallery { grid-template-columns: 1fr; }
}

/* Sub-View Styling (Guilds, Minecraft, etc.) */
.cc-community-nav { display: flex; justify-content: center; gap: 8px; margin: 0 auto 20px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.8); border: 1px solid #e6e6e6; box-shadow: 0 6px 16px rgba(0,0,0,0.06); width: fit-content; }
.cc-community-nav-item { padding: 10px 16px; text-decoration: none; color: #334155; font-weight: 700; border-bottom: 3px solid transparent; border-radius: 8px; transition: color 0.2s, border-color 0.2s, background-color 0.2s; background-color: transparent; }
.cc-community-nav-item:hover { color: #0f172a; background-color: rgba(0,0,0,0.05); border-bottom-color: transparent; }
.cc-community-nav-item.active { color: #0072ff; border-bottom-color: #0072ff; background-color: rgba(0,114,255,0.08); }
.cc-sot .cc-community-nav-item.active { color: #0072ff; border-bottom-color: #0072ff; background-color: rgba(0,114,255,0.08); }
.cc-minecraft .cc-community-nav-item.active { color: #16a34a; border-bottom-color: #16a34a; background-color: rgba(22,163,74,0.08); }
.cc-community-content { margin-top: 20px; }

.cc-community-section { background: linear-gradient(135deg, #eef7ff, #ffffff); border: 1px solid #e6f0ff; border-radius: 16px; padding: 20px 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.cc-community-section.cc-sot { background: linear-gradient(135deg, #e1f5fe, #ffffff); border-color: #bee3f8; }
.cc-community-section.cc-minecraft { background: linear-gradient(135deg, #e8f5e9, #ffffff); border-color: #c8e6c9; }
.community-guild-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.community-guild-panel { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; transition: transform 0.15s ease, box-shadow 0.15s ease; border-left: 6px solid #e5e7eb; }
.cc-sot .community-guild-panel { border-left-color: #38bdf8; }
.cc-minecraft .community-guild-panel { border-left-color: #34d399; }
.community-guild-panel:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.guild-panel-title { margin-top: 0; margin-bottom: 12px; font-size: 1.25em; color: #0f172a; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; }
.guild-panel-stats { list-style: none; margin: 0; padding: 0; }
.guild-panel-stats li { margin-bottom: 5px; }
.guild-panel-stats li strong { color: #333; }
.cc-minecraft-stats-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.cc-minecraft-stat-box { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 0 15px 0; overflow: hidden; flex: 1 1 400px; max-width: 500px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.cc-minecraft-stat-box h4 { margin-top: 0; margin-bottom: 10px; padding: 12px 14px; border-radius: 12px 12px 0 0; color: #ffffff; background: linear-gradient(90deg, #22c55e, #16a34a); }
.cc-leaderboard-list { padding-left: 20px; }
.cc-leaderboard-list li { margin-bottom: 8px; }
/* End Community Page Styling */

/* --- Community UI Enhancements --- (moved to ASCII-clean override at top) --- */

/* --- Legal Links Styling --- */
.cc-legal-links { text-align: center; margin-top: 40px; margin-bottom: 20px; font-size: 0.85em; color: #666; width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; clear: both; }
.cc-legal-links a { color: #555; text-decoration: none; padding: 0 5px; }
.cc-legal-links a:hover { text-decoration: underline; color: #222; }
.cc-legal-separator { margin: 0 5px; color: #ccc; }
/* --- End Legal Links Styling --- */

/* --- Admin View Styling (DARK THEME) --- */

/* Admin area background */
body.captain-club_page_captain-club-admin {
    background-color: #2c3338;
}

/* Reset text color for admin sections */
.wrap {
    background-color: #23282d;
    padding: 20px;
    border-radius: 5px;
  gap: 20px;
    border-radius: 5px;
    margin-right: 20px;
}

.wrap,
.wrap * {
    color: #e0e0e0 !important;
}

/* General Admin Page Styling */
.wrap h1,
.wrap h2,
.wrap h3,
.wrap h4 {
    color: #fff !important;
}

.cc-access-denied {
    color: #ffcccc !important;
    background-color: #4d1f1f;
    border: 1px solid #8b3a3a;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

h1.cc-admin-title {
    color: #fff !important;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
    margin: 1em 0;
    padding: 9px 0 4px;
    border-bottom: 1px solid #464b50;
}

.cc-admin-stat {
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    padding: 12px;
    background-color: #32373c;
    border-left: 4px solid #0073aa;
    margin: 10px 0;
}

.cc-error-notice {
    color: #ff6b6b !important;
    font-weight: normal;
    background-color: #3d1a1a;
    border-left: 4px solid #dc3232;
    padding: 12px;
    margin: 10px 0;
}

.shop-section-divider {
    border: 0;
    height: 1px;
    background: #464b50;
    margin: 30px 0;
}

/* Tabbed Navigation Styling */
.nav-tab-wrapper {
    border-bottom: 1px solid #555;
    margin: 20px 0 0;
    padding-left: 0;
    background-color: transparent;
    padding-top: 10px;
}

.nav-tab {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 400;
    color: #c3c4c7 !important;
    text-decoration: none;
    background-color: #32373c;
    border: 1px solid #555;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    margin: 0 4px 0 0;
    transition: all 0.2s;
}

.nav-tab:hover {
    background-color: #464b50;
    color: #fff !important;
}

.nav-tab-active,
.nav-tab-active:hover {
    background-color: #464b50;
    color: #fff !important;
    border-bottom: 1px solid #464b50;
    position: relative;
    bottom: -1px;
    font-weight: 600;
}

/* Search Form and Input Styling */
.cc-admin-search-form {
    margin-top: 20px;
    padding: 20px;
    background-color: #32373c;
    border: 1px solid #464b50;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cc-admin-search-form label {
    font-weight: 600;
    margin-right: 10px;
    color: #fff !important;
    display: inline-block;
    min-width: 100px;
}

.cc-admin-search-form input[type="search"] {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #555;
    border-radius: 3px;
    width: 250px;
    color: #fff !important;
    background-color: #1e2327;
}

.cc-admin-search-form input[type="search"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.cc-admin-search-form .button {
    height: 30px;
    line-height: 28px;
    padding: 0 12px;
    font-size: 13px;
    vertical-align: top;
    background-color: #0073aa;
    color: #fff !important;
    border-color: #0073aa;
}

.cc-admin-search-form .button:hover {
    background-color: #0096dd;
    border-color: #0096dd;
}

/* Table Styling for User and Cooldown Data */
.cc-admin-table-wrapper {
    margin-top: 20px;
    background-color: #32373c;
    border: 1px solid #464b50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cc-admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #32373c;
}

.cc-admin-table th,
.cc-admin-table td {
    padding: 12px;
    text-align: left;
    color: #e0e0e0 !important;
}

.cc-admin-table th {
    background-color: #23282d;
    font-weight: 600;
    border-bottom: 1px solid #464b50;
    color: #fff !important;
}

.cc-admin-table tbody tr {
    border-bottom: 1px solid #3a3f44;
}

.cc-admin-table tbody tr:nth-child(odd) {
    background-color: #2c3035;
}

.cc-admin-table tbody tr:hover {
    background-color: #3a3f44;
}

.cc-admin-table tbody tr:last-child {
    border-bottom: none;
}

.cc-admin-main-table td.column-primary {
    font-weight: 600;
}

.cc-admin-cooldown-table th {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

/* Status and Cooldown Indicators */
.status-expired {
    color: #ff6b6b !important;
    font-weight: bold;
    background-color: #3d1a1a;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
}

.cooldown-active-value {
    color: #ffa726 !important;
    font-weight: bold;
    background-color: #3d2f1a;
  padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
}

.cc-cooldown-title {
    margin-top: 40px;
    color: #fff !important;
    font-size: 18px;
    font-weight: 600;
}

/* Guild Editor Section Styling */
.cc-guild-edit-outer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cc-guild-fieldset {
    border: 1px solid #464b50;
    border-radius: 3px;
    padding: 20px;
    background-color: #32373c;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cc-guild-fieldset legend {
    font-size: 16px;
    font-weight: 600;
    padding: 0 10px;
    color: #fff !important;
    background-color: #32373c;
}

.cc-guild-fields-grid {
    display: flex;
  gap: 20px;
    background-color: #32373c;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cc-guild-fieldset legend {
    font-size: 16px;
    font-weight: 600;
    padding: 0 10px;
    color: #fff !important;
    background-color: #32373c;
}

.cc-guild-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cc-guild-field-item label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #fff !important;
}

.cc-guild-field-item input[type="text"],
.cc-guild-field-item input[type="number"] {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 14px;
    color: #fff !important;
    background-color: #1e2327;
}

.cc-guild-field-item input[type="text"]:focus,
.cc-guild-field-item input[type="number"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.cc-admin-form-submit {
    margin-top: 20px;
    padding: 15px;
    background-color: #2c3035;
    border-top: 1px solid #464b50;
}

.cc-admin-form-submit .button-primary {
    font-size: 14px;
    height: 36px;
    line-height: 34px;
    padding: 0 16px;
    background-color: #0073aa;
    color: #fff !important;
    border-color: #0073aa;
}

.cc-admin-form-submit .button-primary:hover {
    background-color: #0096dd;
    border-color: #0096dd;
}

/* Twitch Token Generator Section Styling */
.tab-content {
    margin-top: 20px;
    background-color: #32373c;
    padding: 25px;
    border: 1px solid #464b50;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.tab-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff !important;
    font-size: 18px;
    font-weight: 600;
}

.tab-content h4 {
    border-bottom: 1px solid #464b50;
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
}

.tab-content p {
    color: #c3c4c7 !important;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tab-content code {
    background-color: #1e2327;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: Consolas, Monaco, monospace;
    color: #79db75 !important;
    border: 1px solid #464b50;
}

.tab-content ul,
.tab-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.tab-content li {
    color: #c3c4c7 !important;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* Form styling within tabs */
.tab-content input[type="text"],
.tab-content input[type="email"],
.tab-content input[type="url"],
.tab-content textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 14px;
    color: #fff !important;
    background-color: #1e2327;
}

.tab-content input[type="text"]:focus,
.tab-content input[type="email"]:focus,
.tab-content input[type="url"]:focus,
.tab-content textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Success messages */
.notice-success {
    background-color: #1a3d1a;
    border-color: #2d5a2d;
    color: #90ee90 !important;
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #28a745;
}

/* Warning messages */
.notice-warning {
    background-color: #3d3a1a;
    border-color: #5a5328;
    color: #ffeb3b !important;
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #ffc107;
}

/* Info messages */
.notice-info {
    background-color: #1a2d3d;
    border-color: #2d4a5a;
    color: #87ceeb !important;
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #17a2b8;
}

/* Ensure links in admin area are visible */
.wrap a {
    color: #4db8ff !important;
    text-decoration: none;
}

.wrap a:hover {
    color: #80ccff !important;
    text-decoration: underline;
}

/* Button consistency */
.wrap .button,
.wrap .button-secondary {
    color: #fff !important;
    border-color: #555;
    background: #32373c;
}

.wrap .button:hover,
.wrap .button-secondary:hover {
    background: #464b50;
    border-color: #666;
    color: #fff !important;
}

.wrap .button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff !important;
}

.wrap .button-primary:hover {
    background: #0096dd;
    border-color: #0096dd;
}

/* Fix for "Connect with Twitch" button and similar */
.tab-content .button,
.tab-content a.button {
    color: #fff !important;
    background-color: #0073aa;
    border-color: #0073aa;
    text-decoration: none;
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 3px;
}

.tab-content .button:hover,
.tab-content a.button:hover {
    background-color: #0096dd;
    border-color: #0096dd;
    color: #fff !important;
}

/* Responsive adjustments for admin area */
@media (max-width: 782px) {
    .cc-guild-edit-outer-grid {
        grid-template-columns: 1fr;
    }
    
    .cc-admin-search-form label {
        display: block;
        margin-bottom: 5px;
    }
    
    .cc-admin-search-form input[type="search"] {
        width: 100%;
        max-width: 400px;
    }
}
/* === Captain Club: Global Dark Theme + American Captain font === */
@font-face {
  font-family: 'American Captain';
  src:
    
    local('American Captain'),
    local('AmericanCaptain'),
    url('../fonts/AmericanCaptain.woff2') format('woff2'),
    url('../fonts/AmericanCaptain.woff') format('woff'),
    url('../fonts/American-Captain.woff2') format('woff2'),
    url('../fonts/American-Captain.woff') format('woff'),
    url('../fonts/american-captain.woff2') format('woff2'),
    url('../fonts/american-captain.woff') format('woff'),
    url('../fonts/AmericanCaptain.ttf') format('truetype'),
    url('../fonts/American-Captain.ttf') format('truetype'),
    url('../fonts/american-captain.ttf') format('truetype'),
    url('../fonts/AmericanCaptain.otf') format('opentype'),
    url('../fonts/American-Captain.otf') format('opentype'),
    url('../fonts/american-captain.otf') format('opentype'),
    url('../fonts/American%20Captain.woff2') format('woff2'),
    url('../fonts/American%20Captain.woff') format('woff'),
    url('../fonts/American%20Captain.ttf') format('truetype'),
    url('../fonts/American%20Captain.otf') format('opentype'),
    url('/assets/fonts/AmericanCaptain.woff2') format('woff2'),
    url('/assets/fonts/AmericanCaptain.woff') format('woff'),
    url('/assets/fonts/American-Captain.woff2') format('woff2'),
    url('/assets/fonts/American-Captain.woff') format('woff'),
    url('/assets/fonts/american-captain.woff2') format('woff2'),
    url('/assets/fonts/american-captain.woff') format('woff'),
    url('/assets/fonts/AmericanCaptain.ttf') format('truetype'),
    url('/assets/fonts/American-Captain.ttf') format('truetype'),
    url('/assets/fonts/american-captain.ttf') format('truetype'),
    url('/assets/fonts/American%20Captain.woff2') format('woff2'),
    url('/assets/fonts/American%20Captain.woff') format('woff'),
    url('/assets/fonts/American%20Captain.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg: #0b0f0d;
  --panel: #111315;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --text-dim: #cbd5e1;
  --accent: #16a34a;       /* green accent */
  --accent-600: #15803d;
  --accent-700: #166534;
  --border: #1f2421;

  --header-bg: #0f1412;
  --header-border: #1f2421;
}

/* Base */
html, body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Varela Round', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
}
a{ color:#86efac; }
a:hover{ color:#bbf7d0; }
main{ display:block; padding:24px 12px; }

/* Site header: centered bar with two links */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}
.site-nav{
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}
.site-nav .nav-link{
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
}
.site-nav .nav-link:hover{
  background: rgba(255,255,255,0.06);
}

/* Home page quick styling */
.home-wrapper{ max-width:720px; margin:12vh auto 8vh; text-align:center; background:transparent; }
.home-title{ font-family:'American Captain', inherit; font-size:2.4rem; letter-spacing:.5px; margin:0 0 8px; color:var(--text); }
.home-subtitle{ margin:0 0 18px; color:var(--text-dim); }
.home-links{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.home-link{ color:var(--text); text-decoration:underline; }

/* Buttons (accent) */
.discord-button{ background-color: var(--accent) !important; }
.discord-button:hover{ background-color: var(--accent-600) !important; }
#cc-header-login-button{ background-color: var(--accent) !important; }
#cc-header-login-button:hover{ background-color: var(--accent-600) !important; }

/* Titles */
.cc-page-title{
  color: var(--text) !important;
  text-shadow: none !important;
  font-family: 'American Captain', inherit !important;
}

/* Muted texts and links suitable for dark background */
.cc-intro-text,
.shop-cache-disclaimer,
.shop-last-refreshed,
.next-restock-date,
.cc-legal-links,
.cc-legal-links a{
  color: var(--muted) !important;
}

/* Shop dark panels */
.shop-item{
  background-color: var(--panel) !important;
  border-color: var(--border) !important;
}
.shop-item img.shop-cover-image[src$='placeholder-cover.png']{ background-color:#0f1311 !important; }
.shop-item-no-image{ background-color:#0f1311 !important; color:#3f3f46 !important; }
.shop-item .pb-cost,
.shop-item-quantity{ background-color: rgba(0,0,0,0.55) !important; }
.upcoming-shop-title{ color: var(--text) !important; }
hr.shop-section-divider{
  background-image: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.5), rgba(255,255,255,0)) !important;
}

/* Header/login widget consistency */
#cc-user-widget, .cc-dropdown{
  background-color: rgba(0,0,0,0.7) !important;
  color: var(--text) !important;
}
.cc-dropdown li a:hover{ background-color:#1f2937 !important; }

/* Faded bg image dimmed on dark theme */
body.page-id-516::before,
body.page-template-captain-club::before,
.captain-club-content-wrapper::before{
  opacity: 0.06 !important;
  filter: grayscale(100%);
}
/* Varela Round font-face for body text */
@font-face {
  font-family: 'Varela Round';
  src:
    url('../fonts/VarelaRound-Regular.ttf') format('truetype'),
    url('/assets/fonts/VarelaRound-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Use American Captain for headings/titles only */
h1, h2, h3, h4,
.current-shop-title,
.upcoming-shop-title,
.cc-page-title {
  font-family: 'American Captain', 'Varela Round', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif !important;
  letter-spacing: .5px;
}
/* Readability fix: dark text on light cards within dark theme */
.cc-minecraft-stat-box,
.cc-minecraft-stat-box p,
.cc-minecraft-stat-box li,
.cc-minecraft-stat-box strong,
.community-guild-panel,
.community-guild-panel p,
.community-guild-panel li,
.community-guild-panel strong{
  color: #111315 !important;
}
/* ——— Home Landing (The Phuzz) ——— */
.home-landing {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 16px 32px;
  max-width: 980px;
  margin: 0 auto;
}
.home-hero-title {
  font-family: 'Varela Round', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  margin: 0;
  letter-spacing: 0.5px;
  color: #86efac; /* lighter green for better separation */
  text-align: center;
}
.home-hero-slogan {
  font-size: clamp(14px, 2.2vw, 20px);
  color: #cbd5e1;
  margin: 0;
  text-align: center;
}

.cta-row {
  margin-top: 16px;
}
.discord-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #5865F2; /* Discord blurple */
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(88,101,242,0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}
.discord-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(88,101,242,0.45);
  background: #4752C4;
}
.discord-cta .counts {
  opacity: 0.95;
  font-weight: 600;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.social-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #111315;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease, color 0.2s ease;
}
.social-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.30);
}
.social-icon.yt { background: #FF0033; }
.social-icon.tt { background: #000; }

.twitch-embed-wrapper {
  width: min(100%, 1000px);
  margin: 16px auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  background: #000;
}
.twitch-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.twitch-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Next schedule hint (when offline) */
.twitch-schedule {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}
.twitch-schedule a {
  color: #22c55e;
  font-weight: 600;
  text-decoration: none;
}
.twitch-schedule a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .home-landing { padding: 32px 12px; gap: 18px; }
  .social-row { gap: 10px; }
  .social-icon { width: 38px; height: 38px; border-radius: 9px; }
}
/* --- Community UI Enhancements (override, ASCII clean) --- */
.community-banner-item .community-banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  pointer-events: none;
  font-size: 16px;
}
@media (max-width: 480px) {
  .community-banner-item .community-banner-caption {
    font-size: 14px;
    padding: 8px 12px;
  }
}

.guild-title-icon {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  margin-right: 8px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}

/* Leaderboard list enhancements */
.cc-leaderboard-list { list-style: none; padding-left: 0; margin: 0; }
.cc-leaderboard-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 6px;
  margin-bottom: 8px;
}
.lb-rank {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #333;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.lb-avatar {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fafafa;
}
.lb-name {
  font-weight: 600;
  color: #222;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #555;
  margin-left: 8px;
}
.lb-rankname {
  color: #888;
  margin-left: 6px;
  font-size: 12px;
}

/* Medal colors for top 3 */
.lb-rank.medal-1 {
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: #000;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.25);
}
.lb-rank.medal-2 {
  background: linear-gradient(135deg, #c0c0c0, #9e9e9e);
  color: #222;
  box-shadow: 0 0 0 2px rgba(192, 192, 192, 0.25);
}
.lb-rank.medal-3 {
  background: linear-gradient(135deg, #cd7f32, #b06b27);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(205, 127, 50, 0.25);
}

/* Subtle elevation */
.cc-minecraft-stat-box,
.community-guild-panel {
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
/* --- End Community UI Enhancements (override) --- */
/* === Top Bar Layout Overrides (ASCII clean) === */
.site-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.site-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .3px;
  font-family: 'American Captain', 'Varela Round', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
}
.site-brand:hover { text-decoration: underline; }
.site-links {
  display: flex;
  gap: 16px;
  flex: 1 1 auto;
  justify-content: center;
}
.site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Pin Captain Club widget into the top bar (right side) */
.site-actions #cc-user-widget {
  position: relative !important;  /* override fixed */
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.site-actions #cc-header-login-button {
  position: relative !important;  /* override fixed */
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  box-shadow: none !important;
  padding: 8px 14px !important;
}

/* Dropdown should open below the widget inside the top bar */
.site-actions #cc-user-widget .cc-dropdown {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
}

/* Keep nav links consistent */
.site-nav .nav-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
}
.site-nav .nav-link:hover {
  background: rgba(255,255,255,0.06);
}
/* === End Top Bar Layout Overrides === */