/* base.css */
/* Core reset and box-sizing for consistent layout across Tipster Arena */
html {
    box-sizing: border-box;
  }
  
  *, *:before, *:after {
    box-sizing: inherit;
  }
  
  /* Reset default margins and padding for common elements */
  body, h1, h2, h3, p, ul {
    margin: 0;
    padding: 0;
  }
  
  /* Define global CSS variables for consistent styling - optimized for performance */
  :root {
    --navbar-width: 250px;
    --sidebar-width: 350px;
    --content-width: 800px;
    --primary-bg: #001f3f;
    --secondary-bg: #ffffff;
    --border-color: #e1e8ed;
    --primary-blue: #1DA1F2;
    --red-accent: #ff4136;
    --gray-light: #666666;
    --black: black;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.15);
    --padding-small: 12px;
    --margin-small: 10px;
    --border-radius: 12px;
    --font-default: 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 14px;
  }
  
  /* Base styles for the body element */
  body {
    font-family: var(--font-default);
    font-size: var(--font-size-base);
    background-color: var(--primary-bg);
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
  }
  
  /* Styles for the fixed navigation bar */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--navbar-width);
    height: 100vh;
    background-color: var(--primary-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1002;
    box-sizing: border-box;
  }
  
  /* Layout styles for main content container */
  .main-container {
    margin-left: var(--navbar-width);
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--primary-bg);
    box-sizing: border-box;
  }
  
  /* Styles for the main content area */
  .content {
    margin: 0 auto;
    min-height: 100vh;
    box-sizing: border-box;
    background-color: var(--primary-bg);
    color: #ffffff;
    overflow-wrap: break-word;
    padding: 0 8px; /* Simplified padding */
  }
  
  /* Adjust text colors for lists and links within content areas */
  .content li,
  .content a {
    color: var(--black)
  }
  
  /* Hover effects for links within content */
  .content li a:hover,
  .content .follow-username:hover {
    color: var(--red-accent);
    text-decoration: underline;
  }
  
  /* Styles for the fixed sidebar */
  .sidebar {
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    padding: 10px 0;
    background-color: var(--primary-bg);
    color: #ffffff;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow-x: hidden;
  }
  
  /* Styles for the post composition box - optimized for LCP */
  .post-box {
    max-width: 100%; /* Prevent overflow */
    margin: 0 6px var(--margin-small); /* Simplified margins */
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: var(--primary-bg);
    box-sizing: border-box;
    overflow-wrap: break-word;
    transition: all 0.3s ease;
    position: relative;
  }

  .post-box:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-1px);
  }

  /* Post box header with user info */
  .post-box .post-user {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f3f4;
  }

  .post-box .post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 16px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
  }

  .post-box .post-username-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .post-box .post-username {
    color: var(--primary-bg);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    margin: 0;
  }

  .post-box .post-username:hover {
    color: var(--red-accent);
    text-decoration: none;
  }

  /* Enhanced dropdown styling with better guidance */
  .post-box .post-audience,
  .post-box .post-sport {
    background: #f8f9fa;
    color: var(--primary-bg);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666' width='16px' height='16px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 32px;
    transition: all 0.3s ease;
    max-width: 140px;
  }

  .post-box .post-audience:hover,
  .post-box .post-sport:hover {
    background: #e9ecef;
    border-color: var(--red-accent);
  }

  .post-box .post-audience:focus,
  .post-box .post-sport:focus {
    outline: none;
    border-color: var(--red-accent);
    box-shadow: 0 0 0 3px rgba(255, 65, 54, 0.1);
  }

  .post-box .dropdown-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .post-box .dropdown-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-bg);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .post-box .dropdown-help {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
  }

  .post-box .post-settings {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 8px;
  }

  .post-box .setting-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1;
  }

  .post-box .post-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    background: #f8f9fa;
    color: var(--primary-bg);
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }

  .post-box .post-input:focus {
    outline: none;
    border-color: var(--red-accent);
    box-shadow: 0 0 0 3px rgba(255, 65, 54, 0.1);
    background: white;
  }

  .post-box .post-input::placeholder {
    color: #6c757d;
    font-style: italic;
  }

  .post-box .tip-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
  }

  .post-box .tip-odds,
  .post-box .tip-bet-type,
  .post-box .tip-condition,
  .post-box .tip-confidence {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .post-box .tip-odds label,
  .post-box .tip-bet-type label,
  .post-box .tip-condition label,
  .post-box .tip-confidence label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-bg);
    margin-bottom: 4px;
  }

  .post-box .odds-type,
  .post-box .bet-type,
  .post-box .each-way {
    background: white;
    color: var(--primary-bg);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666' width='16px' height='16px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 32px;
    transition: all 0.3s ease;
  }

  .post-box .odds-type:hover,
  .post-box .bet-type:hover,
  .post-box .each-way:hover {
    border-color: var(--red-accent);
  }

  .post-box .odds-type:focus,
  .post-box .bet-type:focus,
  .post-box .each-way:focus {
    outline: none;
    border-color: var(--red-accent);
    box-shadow: 0 0 0 3px rgba(255, 65, 54, 0.1);
  }

  .post-box #odds-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .post-box #odds-input-decimal,
  .post-box #odds-numerator,
  .post-box #odds-denominator {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--primary-bg);
    transition: border-color 0.3s ease;
  }

  .post-box #odds-input-decimal:focus,
  .post-box #odds-numerator:focus,
  .post-box #odds-denominator:focus {
    outline: none;
    border-color: var(--red-accent);
    box-shadow: 0 0 0 3px rgba(255, 65, 54, 0.1);
  }

  .post-box #odds-input-fractional {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .post-box #odds-input-fractional span {
    font-size: 14px;
    color: var(--primary-bg);
  }

  .post-box .star-rating {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .post-box .star-rating .stars {
    display: flex;
    gap: 4px;
  }

  .post-box .star-rating .stars i {
    font-size: 20px;
    color: #ffd700;
    cursor: pointer;
    transition: color 0.2s ease;
  }

  .post-box .star-rating .stars i:hover,
  .post-box .star-rating .stars i.fas {
    color: #ffd700;
  }

  .post-box .star-rating .stars i.far {
    color: #e9ecef;
  }

  .post-box .star-rating .stars i.far:hover {
    color: #ffd700;
  }

  .post-box .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
  }

  .post-box .post-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .post-box .post-action-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 16px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .post-box .post-action-btn:hover {
    background: #f8f9fa;
    color: var(--red-accent);
  }

  .post-box .post-action-btn.image:hover {
    color: #28a745;
  }

  .post-box .post-action-btn.gif:hover {
    color: #17a2b8;
  }

  .post-box .post-action-btn.poll:hover {
    color: #ffc107;
  }

  .post-box .post-action-btn.emoji:hover {
    color: #fd7e14;
  }

  .post-box .post-action-btn.location:hover {
    color: #6f42c1;
  }

  .post-box .post-action-btn.schedule:hover {
    color: #20c997;
  }

  .post-box .post-action-btn.bold:hover {
    color: #dc3545;
  }

  .post-box .post-action-btn.italic:hover {
    color: #6c757d;
  }

  .post-box .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .post-box .char-count {
    color: #6c757d;
    font-size: 12px;
  }

  .post-box .post-submit {
    background: var(--red-accent);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .post-box .post-submit:hover:not(:disabled) {
    background: #d9362e;
    transform: translateY(-1px);
  }

  .post-box .post-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
  }

  .post-box .post-preview {
    position: relative;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    display: none;
  }

  .post-box .preview-media {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
  }

  .post-box .remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
  }

  .post-box .remove-preview:hover {
    background: rgba(0, 0, 0, 0.9);
  }

  .tip-feed {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background-color: var(--primary-bg);
    color: #ffffff;
    overflow-wrap: break-word;
  }

  .profile-content {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    color: var(--primary-bg);
    overflow: hidden;
    position: relative;
  }

  button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
  }

  button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }

  button:not(:disabled):hover {
    opacity: 0.8;
  }

  .event-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  .post-avatar,
  .tip-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .trending-tips-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
  }

  .trending-tips-list::-webkit-scrollbar {
    width: 6px;
  }

  .trending-tips-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .trending-tips-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
  }

  .trending-tips-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }

  .trending-tips-list.loading {
    position: relative;
    min-height: 100px;
  }

  .trending-tips-list.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--red-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* Messages card styles moved to messages.css */

  .messages-icon-base {
    font-size: 16px;
  }

  .messages-text-base {
    white-space: nowrap;
  }

  .gif-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .follow-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
  }

  .follow-list::-webkit-scrollbar {
    width: 6px;
  }

  .follow-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .follow-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
  }

  .follow-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }

  .post-box .info-icon {
    color: #6c757d;
    font-size: 12px;
    cursor: help;
    margin-left: 4px;
  }

  .post-box .info-icon:hover {
    color: var(--red-accent);
  }

  .post-box .tooltip {
    position: relative;
    display: inline-block;
  }

  .post-box .tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
  }

  .post-box .tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
  }

  .post-box .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }

/* Search Results Styles */
.search-results {
    display: none;
}

/* More Sports Popup Styles */
.nav-more-sports-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--navbar-width);
    height: 100vh;
    background: white;
    z-index: 1004;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.nav-more-sports-popup-content {
    position: relative;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.nav-more-sports-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-more-sports-close:hover {
    background: #f0f0f0;
    color: #333;
}

.nav-more-sports-popup h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-bg);
    text-align: left;
    padding-right: 40px;
}

.nav-more-sports-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.nav-more-sports-list li {
    margin: 0;
}

.nav-more-sports-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--primary-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 4px;
}

.nav-more-sports-list a:hover {
    background: #f8f9fa;
    color: var(--red-accent);
    transform: translateX(4px);
}

.nav-more-sports-list i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--red-accent);
}