body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: #f7f9fa;
  color: #222;
}

.main-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 16px 0;
  background: #fff;
  border-bottom: 2px solid #00a7e9;
}

.GenieBlocks-Logo {
  width: 90px;
  height: 32px;
  margin-bottom: 8px;
  object-fit: contain;
}

.main-header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  color: #00a7e9;
}

.main-content {
  max-width: 420px;
  margin: 32px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 24px 18px 18px 18px;
}

.connection-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}

.status {
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 18px;
  border-radius: 16px;
  background: #eee;
  color: #888;
  margin-right: 10px;
  transition: background 0.2s, color 0.2s;
}
.status.connected {
  background: #d2f8e5;
  color: #1a7f37;
}
.status.disconnected {
  background: #ffeaea;
  color: #c41c1c;
}

#butConnect {
  background: #00a7e9;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#butConnect:hover {
  background: #008dc3;
}

.otaa-section {
  margin-bottom: 28px;
}
.otaa-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-row label {
  min-width: 90px;
  font-weight: 500;
}
.form-row input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 1rem;
}
.form-row button {
  padding: 6px 14px;
  border-radius: 16px;
  border: none;
  background: #00a7e9;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.form-row button:disabled {
  background: #b3e2f7;
  color: #fff;
  cursor: not-allowed;
}
.form-row button:not(:disabled):hover {
  background: #008dc3;
}

.log-section {
  margin-top: 18px;
  text-align: right;
}
#toggleLog {
  background: #eee;
  color: #222;
  border: none;
  border-radius: 16px;
  padding: 5px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 8px;
}
#toggleLog:hover {
  background: #d2f8e5;
}
.log-area {
  display: none;
  background: #222;
  color: #e6ffe6;
  font-family: 'Fira Mono', monospace;
  font-size: 0.98rem;
  border-radius: 8px;
  margin-top: 8px;
  padding: 12px 10px;
  min-height: 60px;
  max-height: 180px;
  overflow-y: auto;
  text-align: left;
}

.bt-warning {
  display: flex;
  align-items: flex-start;
  background: #fff3cd;
  color: #856404;
  border: 1.5px solid #ffeeba;
  border-radius: 10px;
  padding: 18px 18px 14px 18px;
  margin: 18px auto 24px auto;
  max-width: 480px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  font-size: 1.08em;
}
.bt-warning-icon {
  font-size: 2.1em;
  margin-right: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}
.bt-warning-content {
  flex: 1;
}
@media (max-width: 600px) {
  .bt-warning {
    max-width: 98vw;
    padding: 12px 8px 10px 8px;
    font-size: 0.98em;
}
  .bt-warning-icon {
    font-size: 1.5em;
    margin-right: 8px;
}
}

.app-version {
  position: fixed;
  right: 12px;
  bottom: 10px;
  left: auto;
  background: rgba(0,0,0,0.08);
  color: #0074d9;
  font-size: 0.98em;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 16px;
  z-index: 9999;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  pointer-events: none;
  transition: all 0.2s;
}
@media (max-width: 600px) {
  .app-version {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 6px;
    font-size: 0.93em;
    padding: 3px 10px;
    text-align: center;
}
}

/* Modern minimal tab başlıkları */
.tab-container-modern {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  gap: 0;
  border-bottom: 2px solid #e0e0e0;
  background: #fff;
}
.tab-modern {
  flex: 1;
  min-width: 120px;
  padding: 12px 0 10px 0;
  font-size: 1.08em;
  text-align: center;
  background: #fff;
  color: #888;
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-bottom 0.2s;
  outline: none;
}
.tab-modern.active {
  color: #00a7e9;
  border-bottom: 2.5px solid #00a7e9;
  font-weight: 700;
  background: #fff;
}
.tab-modern:not(.active):hover {
  color: #00a7e9;
  background: #f7f9fa;
}
@media (max-width: 600px) {
  .tab-modern {
    min-width: 80px;
    font-size: 1em;
    padding: 10px 0 8px 0;
  }
}

/* Firmware Tab Styles */
.firmware-form {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.firmware-header {
    margin-bottom: 24px;
    text-align: center;
}

.firmware-header h3 {
    margin: 0 0 8px;
    color: #333;
    font-size: 1.5em;
}

.firmware-info {
    color: #666;
    font-size: 0.95em;
}

.firmware-controls {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.file-input-container {
    margin-bottom: 20px;
    width: 100%;
}

.file-input-container input[type="file"] {
    display: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #00a7e9;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1em;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-input-label:hover {
    background: #0097d1;
}

.file-input-label:active {
    background: #0088bd;
}

.file-input-label svg {
    color: currentColor;
}

.firmware-details {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.detail-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 0.95em;
}

.detail-label {
    color: #666;
    width: 80px;
}

.detail-value {
    color: #333;
    font-family: monospace;
}

.progress-container {
    margin: 24px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #444;
    font-size: 0.95em;
}

.progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #00a7e9;
    transition: width 0.3s ease;
}

.firmware-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.firmware-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1em;
}

.primary-button {
    background: #28a745;
    color: white;
}

.primary-button:hover {
    background: #218838;
}

.danger-button {
    background: #dc3545;
    color: white;
}

.danger-button:hover {
    background: #c82333;
}

.text-button {
    background: none;
    border: 1px solid #ccc;
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.text-button:hover {
    background: #f1f3f5;
    border-color: #aaa;
}

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

.firmware-log {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #444;
}

#firmware-log-content {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.4;
}

.log-entry {
    margin-bottom: 4px;
    padding: 2px 0;
}

.log-entry.info {
    color: #495057;
}

.log-entry.success {
    color: #28a745;
    font-weight: 500;
}

.log-entry.error {
    color: #dc3545;
    font-weight: 500;
}

/* Tab Container Styles */
.tab-container-modern {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    gap: 0;
}

.tab-modern {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
}

.tab-modern:hover {
    color: #00a7e9;
}

.tab-modern.active {
    color: #00a7e9;
    border-bottom-color: #00a7e9;
}

/* Responsive Styles */
@media (max-width: 600px) {
    .firmware-form {
        padding: 12px;
    }
    
    .firmware-controls {
        padding: 16px;
    }
    
    .firmware-actions {
        flex-direction: column;
    }
    
    .firmware-actions button {
        width: 100%;
    }
    
    #firmware-log-content {
        height: 150px;
    }
    
    .file-input-label {
        padding: 10px 12px;
        font-size: 0.95em;
    }
    
    .firmware-header h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 600px) {
  .main-content {
    max-width: 100vw;
    margin: 6px 0;
    padding: 6px 2vw 6px 2vw;
}
  .main-header {
    padding: 12px 0 6px 0;
}
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 12px;
  }
  .form-row label {
    min-width: 0;
    font-size: 1em;
    margin-bottom: 2px;
  }
  .form-row input {
    width: 100%;
    min-width: 0;
    font-size: 1em;
    box-sizing: border-box;
  }
  .form-row button {
    width: 100%;
    min-width: 0;
    font-size: 1em;
    margin-bottom: 2px;
  }
  .bt-warning {
    max-width: 100vw;
    padding: 8px 4px 8px 4px;
    font-size: 0.98em;
    margin: 8px 0 12px 0;
  }
  .bt-warning-content {
    font-size: 1em;
  }
  h1 {
    font-size: 1.15em !important;
    word-break: break-word;
    text-align: center;
}
  .connection-section {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 18px;
  }
  #butConnect, .status {
    width: 100%;
  box-sizing: border-box;
    text-align: center;
}
}

.firmware-timer {
  margin: 10px 0 0 0;
  font-size: 1.08em;
  color: #444;
  font-weight: 500;
  letter-spacing: 0.5px;
}
#firmware-timer-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.08em;
  color: #00a7e9;
  margin-left: 4px;
}
