:root {
  --primary-color: #1A5F1E;
  --primary-light: #4CAF50;
  --error-color: #d32f2f;
  --text-dark: #2d3748;
  --text-medium: #4a5568;
  --background: #f5f7fa;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --success-bg: #f0fff4;
  --warning-bg: #fffbf0;
  --warning-border: #f6ad55;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
  padding: 20px;
  background-image: linear-gradient(to bottom right, #f5f7fa 0%, #e4e7eb 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.header {
  padding: 24px;
  background-color: var(--primary-color);
  color: white;
  text-align: center;
}

.header h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}

.house-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  position: relative;
}

.house-block.fixed-stake {
  border: 2px solid var(--primary-color);
  background-color: var(--success-bg);
}

.house-block.freebet-house {
  border: 2px solid var(--warning-border);
  background-color: var(--warning-bg);
}

.house-block.freebet-house::before {
  content: "FREE BET";
  position: absolute;
  top: -10px;
  left: 15px;
  background: var(--warning-border);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

.input-row {
  margin-bottom: 15px;
}

.input-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-medium);
}

.input-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
}

.input-row input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.freebet-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.freebet-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.freebet-checkbox label {
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  margin: 0;
}

.fix-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: 500;
  transition: all 0.2s;
}

.fix-btn:hover {
  background-color: var(--primary-light);
}

.fix-btn.fixed {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

/* ===== BOTÕES DE RESULTADO (MAIS DISCRETOS) ===== */
.result-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.result-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  background: #f5f5f5;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-win {
  border-color: #ccc;
}

.result-win:hover:not(.selected-win):not(.selected-lose) {
  background: #e8f5e9;
  border-color: #4CAF50;
  transform: scale(1.1);
}

.result-lose {
  border-color: #ccc;
}

.result-lose:hover:not(.selected-win):not(.selected-lose) {
  background: #ffebee;
  border-color: #f44336;
  transform: scale(1.1);
}

.result-btn.selected-win {
  background: #4CAF50;
  color: white;
  border-color: #388E3C;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  transform: scale(1.1);
}

.result-btn.selected-lose {
  background: #f44336;
  color: white;
  border-color: #d32f2f;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
  transform: scale(1.1);
}

/* ===== BOTÃO CONTABILIZAR ===== */
.btn-contabilizar {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-contabilizar:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-contabilizar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== BOTÃO DASHBOARD ===== */
.btn-dashboard {
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 13px;
}

.btn-dashboard:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

/* ===== BOTÃO COPIAR LINK ===== */
.btn-copy {
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 13px;
}

.btn-copy:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

/* ===== BOTÃO LOGOUT ===== */
.btn-logout {
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.3);
}

/* ===== BOTÃO ENTRAR COM GOOGLE ===== */
.btn-google-login {
  width: 100%;
  padding: 16px;
  background: white;
  color: #333;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-google-login:hover {
  background: #f8f9fa;
  border-color: #4285f4;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
  transform: translateY(-2px);
}

.btn-google-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-google-login img {
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

/* ===== RESULTADOS ===== */
.result-container {
  padding: 20px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border);
}

.result-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.result-item {
  background: var(--card-bg);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.result-item strong {
  display: block;
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 5px;
}

.result-item .positive {
  color: var(--primary-color);
  font-weight: 600;
}

.result-item .negative {
  color: var(--error-color);
  font-weight: 600;
}

.result-item .neutral {
  color: var(--text-medium);
  font-weight: 600;
}

.detailed-results {
  padding: 20px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.results-table th,
.results-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.results-table th {
  background-color: var(--background);
  font-weight: 500;
  color: var(--text-medium);
}

.profit-positive {
  color: var(--primary-color);
  font-weight: 500;
}

.profit-negative {
  color: var(--error-color);
  font-weight: 500;
}

.profit-neutral {
  color: var(--text-medium);
  font-weight: 500;
}

.freebet-badge {
  display: inline-block;
  background: var(--warning-border);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 5px;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.value-updated {
  animation: pulse 0.5s ease;
}

/* ===== SISTEMA DE LOGIN (MODAL) ===== */
.modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  color: var(--primary-color);
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-medium);
  font-size: 14px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .inputs-grid {
    grid-template-columns: 1fr;
  }
  
  .result-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .control-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .result-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .result-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .modal-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .result-content {
    grid-template-columns: 1fr;
  }
  
  .container {
    border-radius: 0;
  }
  
  .header h1 {
    font-size: 18px;
  }
}