@font-face {
  font-family: Determination;
  src: url(determination.ttf);
}

:root {
  --bg-color: #000000;
  --card-bg: #000000;
  --card-border: #ffffff;
  --text-main: #ffffff;
  --dim-border: #333;
  --hover-bg: #222;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  font-family: Determination, sans-serif;
  background-image: url("gaster.png");
  background-size: 46px 104px;
  background-position: 0 0;
  backdrop-filter: brightness(0.5);
}

/* Layout Containers */
.container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.col {
  flex: 1;
  min-width: 300px;
}

/* Card Components */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--card-border);
  background-color: #0a0a0a;
}

.card-title {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 1px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-content {
  padding: 15px;
}

.center-align {
  text-align: center;
  justify-content: center;
}

/* Buttons */
button {
  cursor: pointer;
  font-family: Determination, sans-serif;
  transition: background-color 0.2s;
}

.btn-header {
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 5px 12px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-header:hover {
  background-color: #555;
}

.btn-header i {
  font-size: 16px;
}

.btn-clear-all {
  background-color: #000;
  border: 1px solid #fff;
  color: #fff;
  width: 100%;
  max-width: 300px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}

.btn-clear-all:hover {
  background-color: #fff;
  color: #000;
}

.btn-clear-all:active {
  transform: translateY(1px);
}

.action-bar {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

/* Textareas */
textarea {
  width: 100%;
  min-height: 150px;
  font-size: 18px;
  padding: 15px;
  background-color: #000;
  color: #fff;
  border: 1px solid var(--dim-border);
  resize: none;
  display: block;
  outline: none;
  overflow-y: hidden;
}

textarea:focus {
  border-bottom: 1px solid #fff;
}

.normal-font {
  font-family: Determination, monospace;
}

.wingdings-font {
  font-family: "Symbola", "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", "Noto Sans Symbols 2", sans-serif;
  font-weight: 400;
  font-variant-emoji: text;
  font-size: 24px;
  line-height: 1.8;
}

/* Keyboard */
.keyboard-wrapper {
  background-color: #0a0a0a;
  padding: 15px;
  user-select: none;
  text-align: center;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
  width: 100%;
  flex-wrap: nowrap;
}

.key-btn {
  width: 45px;
  height: 55px;
  margin: 2px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  border: 1px solid #444;
  border-radius: 2px;
  color: white;
  position: relative;
  flex-shrink: 1;
  min-width: 20px;
}

.key-btn:active,
.key-active {
  background-color: #fff;
  border-color: #fff;
}

.key-btn:active *,
.key-active * {
  color: #000 !important;
}

.key-wingding {
  font-size: 20px;
  line-height: 1.2;
  color: #fff;
}

.key-char {
  font-size: 10px;
  color: #666;
  font-weight: 600;
  position: absolute;
  bottom: 4px;
}

.key-special {
  background-color: #333;
  width: 70px;
  flex-shrink: 0;
}

.key-space {
  width: 250px;
  flex-direction: row;
  flex-shrink: 1;
}

/* Responsive Keys */
@media only screen and (max-width: 600px) {
  .keyboard-wrapper {
    padding: 10px 5px;
  }

  .key-btn {
    width: auto !important;
    flex: 1;
    height: 12vw;
    margin: 1px;
  }

  .key-special {
    width: auto !important;
    flex: 1.5;
  }

  .key-space {
    width: auto !important;
    flex: 5;
  }

  .key-wingding {
    font-size: 5vw;
  }

  .key-char {
    font-size: 2.5vw;
  }

  .row {
    flex-direction: column;
  }
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background-color: #222;
  border: 1px solid #444;
  color: #fff;
  padding: 10px 20px;
  margin-top: 10px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  font-size: 14px;
  text-align: center;
}

.toast.show {
  opacity: 1;
}