:root {
    --bg-color: #f8f8f8;
    --surface-color: #ffffff;
    --surface-hover: #f0f0f0;
    --accent-color: #333333;
    /* Modern Black/Dark Gray Accent */
    --accent-hover: #000000;
    --border-color: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --acrylic-bg: rgba(255, 255, 255, 0.85);
    --glass-blur: 16px;
    --radius-l: 16px;
    --radius-m: 10px;
    --radius-s: 6px;
    --font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --shadow-depth: 0 10px 40px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.12);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    animation: fadeIn 0.6s ease;
}

img,
video {
    image-rendering: pixelated;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ... existing body ... */

/* ... existing body ... */

.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-l);
    padding: 30px;
    box-shadow: var(--shadow-depth);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: slideUp 0.6s ease backwards;
}

.home-grid .card:nth-child(1) {
    animation-delay: 0.1s;
}

.home-grid .card:nth-child(2) {
    animation-delay: 0.2s;
}

.home-grid .card:nth-child(3) {
    animation-delay: 0.3s;
}

.home-grid .card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px) scale(1.01);
}

.selection-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-l);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-depth);
    animation: slideUp 0.5s ease backwards;
}

.form-input,
.form-textarea,
.custom-select__trigger {
    border: 2px solid #ccc !important;
    /* Visible border for inputs */
}

.form-input:focus,
.form-textarea:focus,
.custom-select__trigger:focus {
    border-color: var(--accent-color) !important;
}

.btn {
    border: 2px solid #ccc;
    /* Visible border for buttons */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

.acrylic {
    background: var(--acrylic-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links a,
.nav-links button {
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-s);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(0, 0, 0, 0.05);
}

.btn-nav-primary {
    background-color: var(--accent-color) !important;
    color: white !important;
}

.btn-nav-primary:hover {
    background-color: var(--accent-hover) !important;
}

.hero {
    padding: 160px 20px 80px;
    text-align: center;
    background: radial-gradient(circle at top center, #eef6fc 0%, #f3f3f3 70%);
    width: 100%;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.server-ip-container {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 16px 32px;
    border-radius: var(--radius-m);
    display: inline-flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow-depth);
    margin-bottom: 15px;
}

.server-ip-container:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}

.server-ip-container:active {
    transform: scale(0.98);
}

.copy-icon {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.content-grid {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 10px;
    }

    .navbar {
        height: auto;
        padding-top: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-links a {
        padding: 8px 12px;
        background: rgba(0, 0, 0, 0.03);
        border-radius: var(--radius-s);
    }
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px auto;
    max-width: 800px;
}

.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-l);
    padding: 40px;
    box-shadow: var(--shadow-depth);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

.card-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.card h2,
.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-s);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: auto;
}

.btn:hover {
    background: #f0f0f0;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border-color: transparent;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-discord {
    background: #5865F2;
    color: #fff;
    border: none;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.btn-back {
    margin-bottom: 20px;
    align-self: flex-start;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: 2px solid var(--accent-color);
    background: #fff;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select__trigger {
    padding: 16px;
    font-size: 1rem;
    color: var(--text-primary);
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-options {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    box-shadow: var(--shadow-depth);
    max-height: 250px;
    overflow-y: auto;
    transition: 0.2s;
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    top: 100%;
}

.custom-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: 0.1s;
}

.custom-option:hover {
    background: var(--accent-color);
    color: #fff;
}

.date-picker-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
}

.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-m);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    background: #f9f9f9;
    transition: 0.2s;
    position: relative;
}

.upload-box:hover {
    border-color: var(--accent-color);
    background: #eef6fc;
}

.upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-preview {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.custom-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.custom-modal {
    background: var(--surface-color);
    padding: 60px;
    border-radius: var(--radius-l);
    width: 90%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid var(--border-color);
}

.custom-modal-overlay.open .custom-modal {
    transform: scale(1);
}

.admin-layout {
    display: flex;
    padding-top: 60px;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    position: fixed;
    height: 100%;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 50px;
    background: #fafafa;
}

.status-open {
    background: #e6f4ff;
    color: #0078d4;
}

.status-pending {
    background: #fff4ce;
    color: #7a5400;
}

/* Universal Design & Shadows */
.shadow-fixed {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.shadow-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}

.shadow-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

/* Global Pointer Cursor */
button,
.btn,
input[type="submit"],
select,
.custom-select__trigger,
.server-ip-container,
.user-avatar,
.dropdown-item,
.upload-box {
    cursor: pointer !important;
}

.card {
    background: var(--surface-color);
    border: 1px solid #d0d0d0;
    /* Darker border */
    border-radius: var(--radius-l);
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Visible permanent shadow */
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Support Hub Selection Boxes */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.selection-box {
    background: var(--surface-color);
    border: 2px solid #d0d0d0;
    /* Darker border */
    border-radius: var(--radius-l);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Visible permanent shadow */
}

.selection-box:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.selection-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.selection-box p {
    color: var(--text-secondary);
}

.selection-box.report:hover {
    border-color: #d13438;
}

/* Media Preview Styling */
.media-preview-container img,
.media-preview-container video {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #eee;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 10px;
    }

    .navbar {
        height: auto;
        padding-top: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .content-grid {
        padding-top: 160px !important;
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding-top: 160px;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
        padding-top: 140px;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }

    .admin-main {
        margin-left: 0;
        padding: 20px;
    }

    .post-container {
        flex-direction: column;
    }

    .post-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .post-avatar {
        margin-bottom: 0;
        width: 50px;
        height: 50px;
    }

    .custom-modal {
        padding: 30px;
        width: 95%;
    }
}

/* YouTube-like Forum Styles */
.yt-post-container {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    /* transition: background 0.2s; */
    /* Remove hover effect for cleaner look unless interactive */
    position: relative;
}

.yt-post-container::after {
    /* Modern separator line */
    content: '';
    position: absolute;
    bottom: 0;
    left: 56px;
    /* Align with text start */
    right: 0;
    height: 1px;
    background: #f0f0f0;
}

/* Remove last separator */
.yt-post-container:last-child::after {
    display: none;
}

.yt-avatar-col {
    flex-shrink: 0;
}

.yt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow on avatar */
}

/* Main Thread Post Modernization */
.yt-post-container[style*="background:#f8f9fa"] {
    background: transparent !important;
    /* Remove grey bg */
    border-bottom: none !important;
    margin-bottom: 30px;
}

/* Make main post header larger */
.yt-post-container[style*="background:#f8f9fa"] .yt-author {
    font-size: 1.1rem;
}

.yt-post-container[style*="background:#f8f9fa"] .yt-body {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 8px;
    margin-bottom: 16px;
}

.yt-content-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yt-header {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.yt-author {
    font-weight: bold;
    color: #0f0f0f;
    margin-right: 4px;
    cursor: pointer;
}

.yt-author:hover {
    text-decoration: underline;
}

/* .yt-author.owner removed */

.yt-handle {
    font-size: 0.75rem;
    color: #606060;
    margin-right: 5px;
    font-weight: normal;
}

.yt-time {
    color: #606060;
    font-size: 0.8rem;
}

.yt-body {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #0f0f0f;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.yt-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-reactions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reaction-badge {
    background: #e5e5e5;
    color: #0f0f0f;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}

.reaction-badge:hover {
    background: #d0d0d0;
}

.yt-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-item {
    cursor: pointer;
    color: #0f0f0f;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}

.action-item:hover {
    background-color: #e5e5e5;
}

.action-item.text-btn {
    width: auto;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 16px;
    padding: 0 10px;
}

.post-attachment {
    margin-top: 5px;
    margin-bottom: 8px;
}

.post-attachment img,
.post-attachment video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: zoom-in;
}

.post-attachment.file a {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.post-attachment.file a:hover {
    background: #e0e0e0;
}

.horizontal-menu {
    min-width: 140px;
    padding: 5px 0;
}

.horizontal-menu a {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* Dropdown fix */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    /* Removed margin-top to prevent hover gap issue */
    border: 1px solid #eee;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-radius: 6px;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Custom Icon Buttons */
.icon-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    /* More like Teams square-ish but rounded */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #606060;
    transition: background 0.2s, color 0.2s;
    width: 32px;
    height: 32px;
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #0f0f0f;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.reply-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 4px;
}

/* Post Actions Bar */
.yt-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Chat Message Actions */
.message-actions {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 4px;
    opacity: 0 !important;
    /* Force hide by default */
    pointer-events: none;
    transition: 0.1s;
    z-index: 10;
}

.yt-post-container:hover .message-actions {
    opacity: 1 !important;
    /* Force show on hover */
    pointer-events: all;
    top: -20px;
}

.dropdown-content {
    display: none !important;
    /* Force hide by default */
    position: absolute;
    top: 100%;
    right: 0;
    /* Removed margin-top to prevent hover gap issue */
    border: 1px solid #eee;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-radius: 6px;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block !important;
    /* Force show on hover */
}

.action-btn {
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: 0.1s;
    background: transparent;
    border: none;
}

.action-btn:hover {
    background: #f0f0f0;
    color: var(--accent-color);
}

/* Reaction Picker Search */
.picker-search {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Full Screen Popup */
.full-screen-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90vw;
    height: 90vh;
    /* Max height, but content centered */
    max-width: 600px;
    max-height: 400px;
    /* Adjust as needed or keep auto for content */
    background: var(--surface-color);
    border-radius: 16px;
    z-index: 10000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.full-screen-popup.open {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: 0.2s;
    line-height: 1;
}

.popup-close-btn:hover {
    color: #333;
    transform: rotate(90deg);
}

/* Context Menu Order Fix */
.context-menu-item {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: 0.1s;
}

.context-menu-item:hover {
    background: #f0f0f0;
}