* {
    box-sizing: border-box;
    font-family: 'Fira Code', sans-serif;
    font-size: 12px;
}

body, html {
    height: 100%;
}

body {
    margin: 0;
    background: #1F2325;
    color: #E3E4E4;
}

main {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: auto;
}

nav {
    padding: 10px 0;
    background: #181C1D;
    margin: 0 0 10px;
}

a {
    color: #E3E4E4;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

a:hover {
    color: #66c0f4;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav li {
    margin-right: 15px;
}

nav li a {
    text-decoration: none;
}

nav li:first-child {
    opacity: 0.5;
}

/* Auth section styles */
nav li.auth-section {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.steam-login {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #181C1D;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.steam-login:hover {
    background: #2a475e;
    color: #66c0f4;
}

.steam-icon {
    width: 16px;
    height: 16px;
}

.user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.username {
    color: #E3E4E4;
    font-weight: 500;
}

.logout-btn {
    background: none;
    border: 1px solid #444;
    color: #E3E4E4;
    padding: 3px 6px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #2a475e;
    color: #66c0f4;
    border-color: #2a475e;
}

p {
    padding: 0 0 0 20px;
    position: relative;
}

p:before {
    content: ">>";
    position: absolute;
    left: 0px;
    opacity: 0.5;
}

p a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

hr {
    border: 0;
    border-bottom: 1px dashed #E3E4E4;
    opacity: 0.5;
    position: relative;
}

footer p {
    opacity: 0.5;
}

footer p:before {
    opacity: 1;
}

.content ul {
    padding: 0 0 0 20px;
    margin: 10px 0;
    list-style: none;
}

.content li {
    position: relative;
}

.content li:before {
    content: ">";
    position: absolute;
    left: -10px;
    opacity: 0.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

img.tag {
    display: inline-block;
    margin: 0;
    transform: translateY(2px);
    pointer-events: none;
    user-select: none;
}

.links a {
    display: inline-block;
}

.links a img {
    display: inline-block;
    margin: 0;
    height: 25px;
}

.faded {
    opacity: 0.5;
}

/* ===== INDEX PAGE STYLES ===== */
.main-search-section {
    background: #181C1D;
    padding: 20px;
    border-radius: 4px;
    margin: 15px 0;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.search-row label {
    margin: 0;
    white-space: nowrap;
}

.main-search-input {
    flex: 1;
    min-width: 250px;
    padding: 8px 12px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
}

.main-search-input:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 1px #66c0f4;
}

.main-search-submit {
    padding: 8px 16px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s ease;
    border-radius: 3px;
    white-space: nowrap;
}

.main-search-submit:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #66c0f4;
}

.search-help {
    opacity: 0.7;
    font-size: 11px;
    margin: 0;
    padding: 0;
}

.search-help:before {
    display: none;
}

.latest-post-section {
    margin: 10px 0;
}

/* ===== USER PROFILE STYLES ===== */

/* User Profile Header */
.user-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    margin-right: 15px;
}

.profile-info {
    flex-grow: 1;
}

.profile-username {
    margin: 0;
    font-size: 24px;
    color: #E3E4E4;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-real-name {
    margin: 5px 0;
    opacity: 0.7;
}

.profile-last-updated {
    margin: 5px 0;
    opacity: 0.5;
    font-size: 11px;
}

/* Status badge styling */
.status-badge {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 10px;
    color: #1F2325;
}

/* Report Button Styles */
.report-button {
    background: #FF6B6B;
    color: white;
    border: none;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.report-button:hover {
    background: #FF5252;
    transform: translateY(-1px);
}

/* Report Modal Styles */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.report-modal-content {
    background: #1F2325;
    border: 1px solid #444;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
}

.report-modal-header h3 {
    margin: 0;
    color: #E3E4E4;
    font-size: 16px;
}

.close-modal {
    background: none;
    border: none;
    color: #E3E4E4;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: #444;
}

.report-form-group {
    padding: 20px;
}

.report-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #E3E4E4;
    font-weight: 500;
}

.report-form-group textarea {
    width: 100%;
    min-height: 120px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    padding: 12px;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
    resize: vertical;
    box-sizing: border-box;
}

.report-form-group textarea:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 1px #66c0f4;
}

.report-char-count {
    text-align: right;
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.7;
}

.report-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px;
}

.report-cancel-btn, .report-submit-btn {
    padding: 8px 16px;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

.report-cancel-btn {
    background: #181C1D;
    color: #E3E4E4;
    border-color: #444;
}

.report-cancel-btn:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #66c0f4;
}

.report-submit-btn {
    background: #FF6B6B;
    color: white;
    border-color: #FF6B6B;
}

.report-submit-btn:hover {
    background: #FF5252;
    border-color: #FF5252;
}

.report-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.report-result {
    padding: 15px 20px;
    border-top: 1px solid #444;
    margin: 0;
}

.report-result.success {
    background: rgba(144, 238, 144, 0.1);
    color: #90EE90;
}

.report-result.error {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

/* Admin Reports Section */
.admin-reports-section {
    margin: 30px 0;
    background: #181C1D;
    border-left: 3px solid #FF6B6B;
}

.admin-reports-section h3 {
    margin: 0 0 15px 0;
    color: #FF6B6B;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 20px 0;
}

.admin-reports-section h3:before {
    display: none;
}

.loading-reports {
    padding: 15px 20px;
    opacity: 0.7;
    font-style: italic;
}

.user-report {
    padding: 15px 20px;
    border-bottom: 1px solid #444;
}

.user-report:last-child {
    border-bottom: none;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.report-meta {
    font-size: 11px;
    opacity: 0.7;
}

.report-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-status.pending {
    background: #FFD700;
    color: #1F2325;
}

.report-status.reviewed {
    background: #90EE90;
    color: #1F2325;
}

.report-status.dismissed {
    background: #888;
    color: #E3E4E4;
}

.report-text {
    background: #1F2325;
    padding: 10px;
    border-radius: 3px;
    margin: 10px 0;
    white-space: pre-wrap;
    border-left: 3px solid #444;
}

/* Main Content Layout */
.profile-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .profile-main-content {
        grid-template-columns: 1fr;
    }
}

/* Information Sections */
.info-section {
    background: #181C1D;
    padding: 15px;
    border-radius: 4px;
}

.info-section h3 {
    margin: 0 0 12px 0;
    color: #66c0f4;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
}

.info-section h3:before {
    display: none;
}

.info-grid {
    display: grid;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label {
    font-weight: 500;
    min-width: 120px;
    opacity: 0.8;
}

/* Steam ID Styles */
.steam-id-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.steam-id-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.steam-id-label {
    font-weight: 500;
    min-width: 80px;
    opacity: 0.8;
}

/* Links Styles */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.links-list a {
    padding: 4px 0;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
}

.links-list a:last-child {
    border-bottom: none;
}

/* Admin controls styling */
.admin-controls, .admin-notes {
    background: #181C1D;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #66c0f4;
}

.admin-controls h3, .admin-notes h3 {
    margin: 0 0 12px 0;
    color: #66c0f4;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-controls-title {
    margin: 0 0 10px 0;
    color: #66c0f4;
    font-weight: bold;
    padding-left: 0;
}

.admin-controls-title:before {
    display: none;
}

.admin-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-form label {
    margin: 0;
    color: #E3E4E4;
    font-weight: normal;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-row label {
    margin: 0;
    font-weight: 500;
}

.admin-select {
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    padding: 4px 8px;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
    cursor: pointer;
}

.admin-select:hover {
    border-color: #66c0f4;
}

.admin-select:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 1px #66c0f4;
}

.admin-submit {
    padding: 4px 12px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.admin-submit:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #66c0f4;
}

/* Admin Notes Styles */
.admin-note-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.note-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-note-textarea {
    background: #1F2325;
    border: 1px solid #444;
    color: #E3E4E4;
    padding: 8px 12px;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
    resize: vertical;
    min-height: 80px;
}

.admin-note-textarea:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 1px #66c0f4;
}

.note-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.note-info {
    font-size: 11px;
    opacity: 0.7;
    font-style: italic;
}

/* Tags Section */
.user-tags-section {
    margin: 20px 0;
}

.tags-display {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    color: #1F2325;
    font-weight: bold;
    font-size: 11px;
    text-transform: capitalize;
    gap: 6px;
}

.remove-tag-form {
    display: inline;
    margin: 0;
}

.remove-tag-btn {
    background: none;
    border: none;
    color: #1F2325;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    padding: 0;
    margin: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.remove-tag-btn:hover {
    background: rgba(31, 35, 37, 0.2);
}

.no-tags {
    opacity: 0.7;
    font-style: italic;
}

.add-tag-section {
    margin-top: 15px;
    position: relative;
}

.add-tag-form {
    margin: 0;
}

.add-tag-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-input {
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    padding: 6px 10px;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
    min-width: 150px;
}

.tag-input:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 1px #66c0f4;
}

.color-input {
    width: 32px;
    height: 32px;
    border: 1px solid #444;
    border-radius: 3px;
    background: none;
    cursor: pointer;
}

.add-tag-submit {
    padding: 6px 12px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.add-tag-submit:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #66c0f4;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #181C1D;
    border: 1px solid #444;
    border-radius: 3px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 2px;
}

.tag-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    color: #1F2325;
    font-weight: bold;
    font-size: 11px;
    text-transform: capitalize;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
}

.tag-suggestion:hover {
    opacity: 0.8;
}

.tag-suggestion:last-child {
    border-bottom: none;
}

/* Steam ID and Profile Info */
.steam-ids, .additional-info {
    margin: 20px 0;
}

.steam-id-box, .profile-info-box {
    background: #181C1D;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.steam-id-box p, .profile-info-box p {
    padding-left: 0;
}

.steam-id-box p:before, .profile-info-box p:before {
    display: none;
}

code {
    background: #1F2325;
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Fira Code', monospace;
}

/* Profile Links */
.profile-links {
    margin: 20px 0;
}

/* Visibility Status Colors */
.visibility-public {
    color: #90EE90;
}

.visibility-friends {
    color: #FFD700;
}

.visibility-private {
    color: #FF6B6B;
}

.visibility-unknown {
    color: #888;
}

/* Search Again Section */
.search-again {
    margin: 20px 0;
}

.search-again-section {
    background: #181C1D;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.search-again-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-again-row label {
    margin: 0;
    white-space: nowrap;
}

.search-input {
    width: 300px;
    margin-left: 10px;
    padding: 4px 8px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
}

.search-input:focus {
    outline: none;
    border-color: #66c0f4;
}

.search-again-input {
    flex: 1;
    min-width: 250px;
    padding: 6px 10px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    font-family: inherit;
    font-size: inherit;
    border-radius: 3px;
}

.search-again-input:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 1px #66c0f4;
}

.search-submit {
    margin-left: 10px;
    padding: 4px 12px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: background 0.2s ease;
    border-radius: 3px;
}

.search-submit:hover {
    background: #2a475e;
}

.search-again-submit {
    padding: 6px 12px;
    background: #181C1D;
    border: 1px solid #444;
    color: #E3E4E4;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.search-again-submit:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #66c0f4;
}

.admin-note-display {
    background: #1F2325;
    padding: 12px;
    border-radius: 3px;
    border: 1px solid #444;
}

.admin-note-content {
    margin-bottom: 8px;
    white-space: pre-wrap; /* Preserves line breaks */
}

.no-notes {
    opacity: 0.7;
    font-style: italic;
    margin: 0;
    padding: 0;
}

.no-notes:before {
    display: none;
}

/* ===== RECENT SEARCHES STYLES ===== */
.recent-searches-section {
    background: #181C1D;
    padding: 20px;
    border-radius: 4px;
    margin: 15px 0;
}

.recent-searches-title {
    margin: 0 0 15px 0;
    color: #66c0f4;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
}

.recent-searches-title:before {
    display: none;
}

.recent-searches-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recent-search-item {
    background: #1F2325;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.recent-search-item:hover {
    background: #2a475e;
}

.recent-search-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 12px 15px;
}

.recent-search-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-search-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.recent-search-info {
    flex: 1;
    min-width: 0; /* Allows text truncation if needed */
}

.recent-search-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.recent-search-username {
    font-weight: 500;
    color: #E3E4E4;
}

.recent-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.recent-search-tags .user-tag {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 10px;
}

.recent-search-date {
    font-size: 11px;
    opacity: 0.6;
    color: #E3E4E4;
}

/* Responsive adjustments for recent searches */
@media (max-width: 768px) {
    .recent-search-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .recent-search-avatar {
        align-self: flex-start;
    }
    
    .recent-search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ===== STATISTICS SECTION STYLES ===== */
.statistics-section {
    background: #181C1D;
    padding: 20px;
    border-radius: 4px;
    margin: 15px 0;
    border-left: 3px solid #66c0f4;
}

.statistics-title {
    margin: 0 0 15px 0;
    color: #66c0f4;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
}

.statistics-title:before {
    display: none;
}

.statistics-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stats-summary {
    opacity: 0.8;
    font-size: 12px;
    color: #E3E4E4;
}

.stats-total {
    font-weight: 500;
}

.tag-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.tag-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1F2325;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.tag-stat-item:hover {
    background: #2a2f32;
}

.tag-stat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    color: #1F2325;
    font-weight: bold;
    font-size: 11px;
    text-transform: capitalize;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-stat-count {
    color: #E3E4E4;
    font-weight: 500;
    font-size: 12px;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tag-stats-grid {
        grid-template-columns: 1fr;
    }
}