:root {
    --primary: #2563eb;
    --secondary: #3b82f6;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --resource-header: #84cc16;
    --points-header: #ec4899;
	--polygon-bg: #8247e5;
    --arena-z-bg: #2e7daf;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding:0 0 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0 24px;
}

.header {
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

h1 {
    color: var(--primary);
    margin: 0 0 16px 0;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.column-header {
	padding: 4px;
	margin-bottom: 0;
	border-radius: 8px;
    font-weight: 600;
    text-align: center;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resource-header {
    background-color: var(--resource-header);
}

.buffs-header {
    background-color: var(--secondary);
}

.points-header {
    background-color: var(--points-header);
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-column-1 {
    grid-column: 1;
}

.stats-column-2 {
    grid-column: 2;
}

.stats-column-3 {
    grid-column: 3;
}

.stat-item {
    background: var(--background);
    padding: 1px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.stat-icon {
    margin-right: 12px;
    font-size: 1.5em;
    width: 36px;
    text-align: center;
}
.stat-icon img{
	width: 36px;
	/*vertical-align: middle;*/
	vertical-align: top;
}
.stat-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary);
}

/* Resource-specific colors */

/*.food-icon { color: #84cc16; }*/
/*.wood-icon { color: #a16207; }*/
/*.stone-icon { color: #78716c; }*/
/*.gold-icon { color: #eab308; }*/
.ap-icon { color: #3b82f6; }
.vip-icon { color: #ec4899; }

.form-section {
    margin: 15px 0;
    padding:12px 24px;
    background: var(--background);
    border-radius: 8px;
}

input[type="text"] {
    width: 90%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
}

button, input[type="submit"], input[type="button"] {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-right: 8px;
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    opacity: 0.9;
}


.actions-grid {
  display: flex;
  flex-direction: column; /* Stack network groups vertically */
  gap: 24px;
}

.network-group {
  display: flex; /* Arrange header and tokens in a row */
  flex-direction: row;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: white;
  align-items: stretch; /* Make header and tokens same height */
}

.network-header {
  padding: 24px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1em;
   /*flex: 0 0 280px;  */
  /* Give header a fixed width */
  flex-direction: column;
  text-align: center;
  background:#9b9b9b;
}

.network-header img {
  width: 48px;
  height: 48px;
  margin: 0 0 12px 0;
}

.network-tokens {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  flex: 1; /* Allow token area to fill remaining space */
  background: var(--background);
}

.action-btn {
  background: var(--secondary);
  color: white;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  flex-grow: 1;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-btn img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.polygon-header {
  background: var(--polygon-bg);
}

.arena-z-header {
  background: var(--arena-z-bg);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .network-group {
    flex-direction: column; /* Stack header on top of tokens */
  }

  .network-header {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }
  
  .network-header img {
     margin: 0 12px 0 0;
  }

  .network-tokens {
    justify-content: center;
  }
}
		

        @media (max-width: 768px) {
            .container {
                padding: 16px;
            }
            
            .stats-container {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            .stats-column-1, .stats-column-2, .stats-column-3 {
                grid-column: 1;
            }
            
            .column-header{
            	flex: 1 0 90%;
            }
            
            
            .stats-column {
                flex-direction: row;
                flex-wrap: wrap;
            }
            
            .stat-item {
                flex: 1 0 45%;
                min-width: 140px;
            }
        }


