/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(135deg, #337bc3 0%, #32dedf 30%, #dfdf32 60%, #ff5e62 80%, #c102e7 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.5s ease;
  overflow-x: hidden;
}

/* Container */
.container {
  width: 400px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: all 0.5s ease;
}

/* Display Section */
.display input {
  width: 100%;
  height: 60px;
  border: none;
  outline: none;
  padding: 10px;
  font-size: 2rem;
  text-align: right;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  color: #333;
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* History */
.history {
  max-height: 100px;
  overflow-y: auto;
  font-size: 0.9rem;
  color: #444;
  padding: 4px;
}

.history::-webkit-scrollbar {
  width: 6px;
}
.history::-webkit-scrollbar-thumb {
  background-color: #999;
  border-radius: 5px;
}

/* Button Container */
.btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.row button {
  flex: 1;
  margin: 4px;
  padding: 15px;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #222;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
}

.row button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.row button:active {
  transform: scale(0.95);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Special Buttons */
#themeToggle,
#angleMode {
  margin-top: 10px;
  padding: 12px 16px;
  font-size: 1.2rem;
  border: none;
  border-radius: 12px;
  background-color: #333;
  color: #fff;
  cursor: pointer;
  align-self: flex-end;
  transition: all 0.3s ease;
}

#themeToggle:hover,
#angleMode:hover {
  background-color: #555;
}

/* Dark Mode Styles */
.dark-mode {
  background: #121212;
  color: white;
}

.dark-mode .container {
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.05);
}

.dark-mode .display input {
  background: rgba(40, 40, 40, 0.8);
  color: #f5f5f5;
}

.dark-mode .history {
  color: #ccc;
}

.dark-mode .row button {
  background: rgba(60, 60, 60, 0.8);
  color: #eee;
}

.dark-mode .row button:hover {
  background: rgba(80, 80, 80, 0.9);
}

.dark-mode #themeToggle,
.dark-mode #angleMode {
  background-color: #fff;
  color: #121212;
}

/* Responsive Layout */
@media (max-width: 500px) {
  .container {
    width: 95%;
    padding: 15px;
  }

  .row button {
    padding: 12px;
    font-size: 0.95rem;
  }

  #themeToggle, #angleMode {
    align-self: stretch;
    width: 100%;
  }
}
