:root {
  --primary-color: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #e3f2fd;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --text-color: #333;
  --text-light: #666;
  --background-color: #f5f5f5;
  --card-color: #fff;
  --border-color: #ddd;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 105px;
  height: auto;
}

h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.tagline {
  color: var(--text-light);
  font-size: 1.1em;
}

.warning-box {
  background-color: #fff3e0;
  border-left: 4px solid var(--warning-color);
  padding: 15px;
  margin-bottom: 25px;
  border-radius: 4px;
}

.warning-box h3 {
  color: var(--warning-color);
  margin-bottom: 15px;
}

.warning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.warning-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.85rem;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .warning-grid {
    grid-template-columns: 1fr;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.info-item {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.85rem;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  background-color: white;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2);
}

/* App message styling */
.app-message {
  background-color: #e3f2fd;
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  font-style: italic;
  color: var(--text-color);
}

small {
  display: block;
  color: var(--text-light);
  margin-top: 5px;
  font-size: 0.85em;
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: var(--primary-dark);
}

#back-btn, #restart-btn {
  background-color: #757575;
  margin-top: 20px;
}

#back-btn:hover, #restart-btn:hover {
  background-color: #616161;
}

.hidden {
  display: none;
}

/* Credentials Section */
#credentialsSection {
  background-color: var(--card-color);
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
  border: 1px solid var(--border-color);
}

#credentialsSection h2 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

/* Success and Error Messages */
.success-message {
  background-color: #e8f5e9;
  border-left: 4px solid var(--success-color);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.error-message {
  background-color: #ffebee;
  border-left: 4px solid var(--error-color);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

#restartButton {
  display: block;
  margin: 20px auto;
}

/* Terminal window styles */
#terminal-window {
  margin: 30px 0;
  background-color: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  font-family: 'Courier New', monospace;
  width: 100%;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #323232;
  padding: 8px 12px;
  border-bottom: 1px solid #444;
}

.terminal-title {
  color: #ddd;
  font-size: 0.9rem;
}



.terminal-content {
  padding: 12px;
  color: #ddd;
  min-height: 250px;
  max-height: 400px;
  overflow-y: auto;
}

#terminal {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.command-line {
  color: #63c563;
  margin-bottom: 5px;
}

.command-line::before {
  content: '$ ';
  color: #63c563;
}

.output-line {
  color: #ddd;
  margin-bottom: 5px;
}

.error-line {
  color: #ff5f56;
  margin-bottom: 5px;
}

.success-line {
  color: #27c93f;
  margin-bottom: 5px;
}

.warning-line {
  color: #ffbd2e;
  margin-bottom: 5px;
}

/* Hide the old console output */
#console-output {
  display: none;
}



#error-details {
  background-color: #f5f5f5;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  text-align: left;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

footer {
  margin-top: 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9em;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

footer p {
  margin: 5px 0;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Catalogue Section Styles */
#catalogueSection {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

#catalogueSection h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

#catalogueSection p:nth-last-child(2),
#catalogueSection p:last-child {
  text-align: center;
  margin-top: 20px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.app-card {
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.app-name {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.2em;
  font-weight: 600;
}

.app-description {
  color: var(--text-color);
  margin-bottom: 20px;
  font-style: italic;
  flex-grow: 1;
  line-height: 1.5;
}

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

.btn-primary, .btn-secondary {
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-block;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  text-decoration: none;
}

.loading-message, .no-apps-message, .error-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-style: italic;
}

.error-message {
  color: var(--error-color);
}

/* Responsive adjustments for catalogue */
@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .app-card {
    padding: 15px;
  }
  
  .app-actions {
    gap: 8px;
  }
  
  .btn-primary, .btn-secondary {
    padding: 12px 16px;
    font-size: 16px;
  }
}

@media (min-width: 769px) {
  .app-actions {
    flex-direction: row;
  }
  
  .btn-primary {
    flex: 1;
  }
  
  .btn-secondary {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  
  button {
    width: 100%;
  }
}
