
:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --background: #0f172a;
  --card-bg: #1e293b;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --border: #334155;
}

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

a {
  color: aliceblue;
  text-decoration:none
}

@font-face {
  font-display: swap;
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  src: url('../Assests/Vazirmatn-UI-NL-Regular.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC, U+0030-0039;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Vazirmatn', 'Inter', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  padding: 1rem;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
}

textarea, input, select {
  vertical-align: bottom;
}

textarea::-webkit-scrollbar {
  width: 0.5rem;
}
textarea::-webkit-scrollbar-thumb {
  background-color: #64748b;
  border-radius: 9999px;
  cursor:default;
}
textarea::-webkit-scrollbar-track {
  background-color: #334155;
}

.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 3rem;
  background-color: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 2rem;
  background: linear-gradient(to right, #3b82f6, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  animation: anime 6s linear infinite;
  background-size: 200%;
}

.subtitle {
  color: var(--text-secondary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.tra-input {
  padding-inline: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--background);
  color: var(--text);
  width: 100%;
  transition: all 0.3s;
  outline: solid 2px transparent;
  outline-offset: calc(2px * -1);
}

.tra-input:focus-within {
  outline-color:var(--primary);
}

.tabs {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tab-buttons {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-button {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  margin-top: 1rem;
}

.tab-content.active {
  display: block;
}

.config-container {
  border-radius: 0.5rem;
  border: solid 1px #334155;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
  transition: all 0.3s;
  outline: solid 2px transparent;
  outline-offset: calc(2px * -1);
}

.config-container:focus-within {
  outline-color:var(--primary);
}

.copy-button {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--text);
  cursor: pointer;
}

.copy-button:hover {
  background: var(--border);
}

textarea {
  width: 100%;
  min-height: 300px;
  padding: 1rem;
  background-color: var(--background);
  color: var(--text);
  font-family: monospace;
  font-size: 0.875rem;
  resize: vertical;
  border: 0;
  outline: 0;
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }
}

.uuid-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.copy-button-uuid {
  position: relative;
  top: 0;
  right: 0;
  padding: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--text);
  cursor: pointer;
}

.copy-button-uuid:hover {
  background: var(--border);
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-button {
  height: 3rem;
  padding-inline: 1.5rem;
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
  align-content: center;
}

.youtube-button {
  background: #ff0033;
}

.youtube-button:hover {
  background: #d1012a;
}

.telegram-button {
  background: #179cde;
}

.telegram-button:hover {
  background: #1789c1;
}

.button-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.generate-button {
  flex: 1;
  height: 3rem;
  padding-inline: 1.5rem;
  background: linear-gradient(to right, var(--primary), #a855f7, var(--primary));
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.3s;
  background-size: 200%;
  animation: anime 6s linear infinite;
}

@keyframes anime {
  0% {
      background-position: 0% 100%;
  }
  100% {
      background-position: 200% 0%;
  }
}

.generate-button:hover {
  opacity: 0.9;
}

.notification {
  direction: rtl;
  position: fixed;
  bottom: 1rem;
  right: -300px;
  width: 250px;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: var(--text);
  transition: right 0.5s ease-in-out;
  z-index: 1000;
}

.notification p {
  margin-block: 1rem;
  font-size: 0.875rem;
  text-align: justify;
}

.notification .telegram-button {
  display: block;
  text-align: center;
  padding: 0.5rem;
  background: #179cde;
  color: white;
  border-radius: 0.25rem;
  text-decoration: none;
}

.notification .telegram-button:hover {
  background: #1789c1;
}

.notification .youtube-button {
  margin-top: 1rem;
  display: block;
  text-align: center;
  padding: 0.5rem;
  background: #ff0033;
  color: white;
  border-radius: 0.25rem;
  text-decoration: none;
}

.notification .youtube-button:hover {
  background: #d1012a;
}

.notification .close-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.notification .close-button:hover {
  color: var(--primary);
}

.notification img {
  border-radius: 0.5rem;
  width: 100%;
}

@media (max-width: 640px) {
  .notification {
    top: 1rem;
    bottom: auto;
    right: 1rem;
  }

}

.return-button {
  border-radius: 0.5rem;
  background-color: #334155;
  color: var(--text);
  transition: all 0.3s;
  height: 3rem;
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding-inline: 1rem;
}

.return-button:hover {
  background-color: #475569;
}

.tr-input-number {
  box-sizing: border-box;
  margin: 0;
  color: var(--text);
  position: relative;
  display: inline-block;
  width: 100%;
  background-color: var(--background);
  border-radius: 0.5rem;
  transition: all 0.2s;
  border: 1px solid var(--border);
  width: 100%;
  outline: solid 2px transparent;
  outline-offset: calc(2px * -1);
}

.tra-input input::placeholder,
.tra-input input::-webkit-input-placeholder,
.tr-input-number-input::-webkit-input-placeholder,
.tr-input-number-input::placeholder {
  color: #475569;
}

.tr-input-number:focus-within {
  outline-color: var(--primary);
}

.tr-input-number-inner {
  display: flex;
  justify-content: space-between;
  column-gap: 0.25rem;
  width: 100%;
  align-items: center;
}

.tr-input-number-input-wrap {
  width: 100%;
  height: 100%;
  padding-inline: 0.75rem;
}

.tr-input-number-input {
  padding: 0;
  text-align: start;
  background-color: transparent;
  border: 0;
  outline: 0;
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
  color: inherit;
  font-size: 1rem;
  width: 100%;
  height: 2.5rem;
}

.tr-input-number-input::-webkit-outer-spin-button,
.tr-input-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

.tr-input-number-handler-wrap {
  display: flex;
  transition: opacity 0.2s linear 0.2s;
  border-style: solid;
  border-color: var(--border);
  border-width: 0;
  border-inline-start-width: 1px;
}

.tr-input-number-handler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  background: #020617;
}

.rounded-se-lg {
  border-start-end-radius: 0rem;
}

.rounded-ee-lg {
  border-start-end-radius: 0.5rem;
  border-end-end-radius: 0.5rem;
}

.tr-input-number-handler:hover,
.tr-input-number-handler:active {
  background: #0f172a;
}

.tr-input-number-handler-up {
  border-left: solid 1px var(--border);
}

.tr-input-number-handler-up,
.tr-input-number-handler-down {
  cursor: pointer;
}

.tr-input-number-handler-down:hover .tr-input-number-handler-down-inner,
.tr-input-number-handler-up:hover .tr-input-number-handler-up-inner {
  color: #fff;
}

.tr-input-number-handler-down-disabled,
.tr-input-number-handler-up-disabled {
  cursor: not-allowed;
}

.tr-input-number-handler-down-disabled .tr-input-number-handler-down-inner,
.tr-input-number-handler-up-disabled .tr-input-number-handler-up-inner {
  color: rgba(255, 255, 255, 0.3);
}

.tr-input-number-handler-down-disabled:hover .tr-input-number-handler-down-inner,
.tr-input-number-handler-up-disabled:hover .tr-input-number-handler-up-inner {
  color: rgba(255, 255, 255, 0.25);
}

.tricon > * {
  line-height: 1;
}

.tr-input-number-handler-up-inner,
.tr-input-number-handler-down-inner {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all 0.2s linear;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input[type="checkbox"] {
  margin-right: 0.5rem;
}

#protocol-toggle {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

#protocol-toggle.none {
  background-color: #0f172a;
  color: #ffffff;
}

#protocol-toggle.tls {
  background-color: #3b82f6;
  color: #fff;
}

#protocol-toggle:hover.none {
  background-color: #15213b;
}

#protocol-toggle:hover.tls {
  background-color: #1d4ed8;
}

.tls-dependent {
  display: none; /* Initially hidden */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.tls-dependent.show {
  display: flex;
  opacity: 1;
}