/* Base styles */
.gold-tracker {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: system-ui, sans-serif;
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .gold-tracker {
        padding: 10px;
    }
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.main-nav {
    margin-bottom: 32px;
    position: relative;
}

@media (max-width: 640px) {
    .main-nav {
        margin-bottom: 20px;
    }
}

.menu-toggle {
    display: none;
    padding: 10px;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

@media (max-width: 640px) {
    .menu-toggle {
        display: block;
    }
}

.menu-bar {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.menu-bar:last-child {
    margin-bottom: 0;
}

.nav-menu {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-item:not(.nav-item-theme) .nav-link:hover {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: white;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.theme-toggle {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.nav-link.active{
    color: #1D5837 !important;
    font-weight: 600;
}

body.darkmode .nav-link.active{
    color: #ffd700 !important;
    font-weight: 600;
}

.money-increase{
    color: #165A1E !important;
}

body.darkmode .money-increase{
    color: #6BAE72 !important;
}

@media (max-width: 640px) {
    .nav-link {
        padding: 12px 16px;
        text-align: left;
        width: 100%;
    }
    
    .theme-toggle {
        padding: 12px 16px;
        text-align: left;
        width: 100%;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
    }
}

.main-title {
    font-size: 48px;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.main-description {
    font-size: 18px;
    color: #666;
}

/* Content layout */
.content-wrapper {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 991px) {
    .content-wrapper {
        flex-direction: column;
    }
}

/* Market section */
.market-section {
    flex: 1;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #ffd700;
}

.market-list {
    display: grid;
    gap: 16px;
}

.market-card {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.2s;
    cursor: pointer;
}

.market-card:hover {
    transform: translateY(-2px);
}

.market-type {
    margin: 0;
    font-size: 18px;
}

.market-name {
    margin: 4px 0 0;
    color: #666;
}

.price-info {
    text-align: right;
}

.current-price {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.price-change {
    margin: 4px 0 0;
    color: #22c55e;
}

/* Updates section */
.updates-section {
    flex: 1;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
    margin: 0 0 24px;
    font-size: 24px;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.update-card {
    padding: 12px;
    border-left: 4px solid #ffd700;
    border-radius: 0 8px 8px 0;
}

.update-text {
    margin: 0;
    font-size: 14px;
}

.update-time {
    color: #575757;
}

body.darkmode .update-time {
    color: #9BA5B1;
}

.update-card.highlight {
    background-color: #f8f9fa;
}

/* History section */
.history-section {
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.history-chart {
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* Dark mode styles */
body.darkmode {
    background: #121212;
    color: #ffffff;
}

body.darkmode .market-section,
body.darkmode .updates-section,
body.darkmode .history-section {
    background: #1E1E1E;
}

body.darkmode .market-card {
    background: #2D2D2D;
}

body.darkmode .update-card.highlight {
    background: #2D2D2D;
}

body.darkmode .nav-link {
    color: white;
}

body.darkmode .theme-toggle {
    color: white;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

@media (max-width: 640px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 999;
        box-shadow: 0 4px 24px rgba(0,0,0,0.08);
        border-radius: 0 0 16px 16px;
        padding: 12px 0;
        margin: 0;
    }
    .nav-menu.open {
        display: flex;
    }
    body.darkmode .nav-menu {
        background: #232323;
    }
}

/* Footer styles */
.footer {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.footer-section {
    padding-right: 20px;
}

.footer-title {
    font-size: 18px;
    margin: 0 0 16px;
    color: #333;
}

.footer-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
}

.footer-contact {
    font-style: normal;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.footer-contact p {
    margin: 0 0 8px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.copyright {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Dark mode styles for footer */
body.darkmode .footer {
    border-top-color: #333;
}

body.darkmode .footer-title {
    color: #fff;
}

body.darkmode .footer-text,
body.darkmode .footer-links a,
body.darkmode .footer-contact,
body.darkmode .copyright {
    color: #999;
}

body.darkmode .footer-bottom {
    border-top-color: #333;
}

body.darkmode .footer-links a:hover {
    color: #ffd700;
}

/* Current Gold Title Styles */
.current-gold-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    text-align: center;
    line-height: 1.2;
    padding: 0;
}

.current-gold-subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
}

body.darkmode .current-gold-subtitle {
    color: #999;
}

.cursor-pointer {
    cursor: pointer;
}

.policy-section, .terms-section {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 32px 24px;
    margin-bottom: 40px;
}

.policy-section h1, .terms-section h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    background: linear-gradient(45deg, #a096d5, #6e53d7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.policy-section h2, .terms-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: #d4a000;
}

.policy-section h3, .terms-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 8px;
    color: #b8860b;
}

.policy-section p, .terms-section p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 12px;
    color: #333;
}

.policy-section a, .terms-section a {
    color: #d4a000;
    text-decoration: underline;
    transition: color 0.2s;
}
.policy-section a:hover, .terms-section a:hover {
    color: #b8860b;
}

@media (max-width: 640px) {
    .policy-section, .terms-section {
        padding: 16px 6px;
    }
    .policy-section h1, .terms-section h1 {
        font-size: 1.4rem;
    }
    .current-gold-title {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
        margin-top: 0.3rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .font-size-10 {
        font-size: 12px;
    }
}

/* Fix FontAwesome icon layout shift - prevent CLS */
.font-size-10 svg,
.money-increase svg,
.text-red-600 svg,
.theme-toggle svg {
    width: 0.75em !important;
    height: 0.75em !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Fixed size for FontAwesome icons in table cells */
.custom-table svg {
    width: 0.75em !important;
    height: 0.75em !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Theme toggle icon should be slightly larger */
.theme-toggle svg {
    width: 1em !important;
    height: 1em !important;
}
body.darkmode .policy-section, body.darkmode .terms-section {
    background: #232323;
    color: #eee;
}
body.darkmode .policy-section p, body.darkmode .terms-section p {
    color: #ccc;
}
body.darkmode .policy-section h2, body.darkmode .terms-section h2 {
    color: #ffd700;
}
body.darkmode .policy-section h3, body.darkmode .terms-section h3 {
    color: #ffa500;
}


.reactEasyCrop_Container {
    z-index: 9999 !important;
  }
  
  .reactEasyCrop_CropArea {
    z-index: 10000 !important;
  }
  
  .group-crop-button button {
    z-index: 10000 !important;
  }

  a {
    color: unset;
  }

/* News item styles */
.feature-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.news-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.news-image {
    width: 270px;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.news-content {
    flex: 1;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
        height: 200px;
    }

    .news-content {
        padding: 0.5rem 0;
    }

    .feature-posts {
        display:  block;
    }
}

/* Custom table styles to replace Bootstrap */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  border-spacing: 0;
}

.custom-table th,
.custom-table td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  text-align: inherit;
}

.custom-table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}

.custom-table tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.custom-table-light {
  color: #212529;
  background-color: #fff;
}

.custom-table-light thead th {
  background-color: #f8f9fa;
  border-bottom-color: #dee2e6;
  color: #212529;
}

.custom-table-light tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.custom-table-dark {
  color: #fff;
  background-color: #212529;
}

.custom-table-dark th,
.custom-table-dark td {
  border-color: #495057;
}

.custom-table-dark thead th {
  background-color: #343a40;
  border-bottom-color: #495057;
  color: #fff;
}

.custom-table-dark tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.custom-table tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.075);
}

.custom-table-dark tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive table on mobile */
@media (max-width: 768px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  
  .custom-table {
    min-width: 100%;
  }
}

.mt-20 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 5px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 5px;
}

a {
    text-decoration: none;
}

.text-green-600 {
    color: #16a34a;
}

.text-red-600 {
    color: #dc2626;
}

.text-yellow-500 {
    color: #eab308;
}

.text-center {
    text-align: center !important;
}

/* Organization section styles */
.org-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.org-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.org-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: white;
}

.org-img-wrap {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.org-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.org-name {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

/* Dark mode styles for organization section */
body.darkmode .org-card {
    background: #2D2D2D;
    color: #fff;
}

body.darkmode .org-card:hover {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #fff;
}

/* Responsive styles for organization section */
@media (max-width: 768px) {
    .org-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .org-card {
        padding: 16px;
    }
    
    .org-img-wrap {
        height: 60px;
    }
    
    .org-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .org-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}