body {
    justify-content: center;
    align-items: center;
    background-color: #f4f4f4;
    font-family: "Twemoji Country Flags", 'Roboto', sans-serif;
    width: 100%; 
    margin: 0; 
}

.container {
    flex-direction: column;
    align-items: center; 
    text-align: center; 
    width: 100%;
    max-width: 700px; 
    margin: 0 auto; 
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    width: 100%;
    max-width: 700px; 
    margin: 0 auto 20px; 
}

.containerAWG, .containerClash {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 95%; 
    max-width: 300px; 
    margin: 0 auto; 
}

#clash {margin-bottom: 10px;}
.header {
    display: flex;
    justify-content: center; 
    align-items: center;
    margin-bottom: 10px; 
    width: 100%; 
    max-width: 400px; 
}

.amnezia-icon {
    width: 50px; 
    height: 50px;
    margin-right: 10px;
	margin-top: -10px;
}

.amnezia-text {
    font-size: 20px;
    font-weight: bold;
    color: #333;
	margin-bottom: 5px;
	
}

.wiresock-text {
    font-size: 20px;
    font-weight: bold;
    color: #333;
	margin-right: 10px;
	margin-bottom: 5px;
}

img {max-width: 400px;}
button {
    width: 100%;
    margin-bottom: 20px;
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
	transition: background 0.3s ease, transform 0.2s ease;
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
} 
.button--loading::after {
    content: "";
    width: 15px;
    height: 15px;
    border: solid rgba(0, 0, 0, 0.1);
    border-top-color: #f15874;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

button.button--loading {
    display: flex;
    justify-content: center;
}

.button--loading .button__text {display: none;}
#generateButton1,#generateButton2 {background: linear-gradient(90deg, #eeac43, #f15874);}
#generateButton3,#generateButton4,#generateButton5 {
	background: linear-gradient(90deg, #eeac43, #f15874);
	margin-bottom: 6px;
}

#telegramButton,#projectsButton {
    background: linear-gradient(90deg, #2a3797, #0d87d2);
	width: 100%;
    max-width: 400px;
    margin: 10px auto;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#newButtons {
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, height 0.5s ease, visibility 0.5s ease;
}

#newButtons.show {
    visibility: visible;
    opacity: 1;
    height: 120px;
}	

#info {
    margin-bottom: 20px;
    color: red;
	border-radius: 5px;
	box-shadow: 0 0 0 1px red inset;
	padding: 15px;
	margin: 0 auto 20px;
	display: none;
}

#status {
    color: red;
	border-radius: 5px;
	box-shadow: 0 0 0 1px red inset;
	padding: 15px;
	margin: 0 auto 20px;
}

#status:empty {display: none;}
#info:empty {display: none;}
.glow-on-hover {
    width: 400px;
	max-width: 90%;
    border: none;
    outline: none;
    color: #fff;
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 5px;
	margin: 10px auto;
}

.glow-on-hover:before {
    content: '';
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    position: absolute;
    top: -2px;
    left:-2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 5px;
}

.glow-on-hover:active {color: #000}
.glow-on-hover:active:after {background: transparent;}
.glow-on-hover:before {opacity: 1;}
.glow-on-hover:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    left: 0;
    top: 0;
    border-radius: 5px;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

.modal {
	overflow-y: scroll;
	animation: fadeIn 2s forwards;
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #F4F4F4;
    margin: 2% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 346px;
	min-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
	position: absolute;
	right: 10px;
	top: 5px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {color: black;}
.modal-line {
    font-weight: bold;
    color: #333;
	margin-bottom: 5px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.Sites, .dnsinfo {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  display: grid;
  align-items: center;
  gap: 8px; 
  flex-wrap: wrap; 
}

.payment-option, .server-option {
  min-width: 100px;
  min-height: 40px;
  padding: 5px;
  padding-bottom: 0px;
  padding-top: 0px;
  text-align: center;
  cursor: pointer;
  background-color: white;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
}

.payment-option::before, 
.server-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #eeac43, #f15874);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 0;
}

.payment-option > * {
  position: relative;
  z-index: 1;
}

.server-option > * {
  position: relative;
  z-index: 1;
}

.payment-option--checked,
.payment-option:has(input:checked), 
.server-option--checked, 
.server-option:has(input:checked) {
  color: white;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.payment-option--checked::before,
.payment-option:has(input:checked)::before, .server-option--checked::before, .server-option:has(input:checked)::before {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.payment-option:hover,.server-option:hover {background-color: rgba(255, 255, 255, 0.2);}
.payment-option-content,.server-option-content {
  display: flex;
  align-items: center;
  text-align: center;
}

.payment-radio, .server-radio {display: none;}
.info-button {
	padding: 0;
	position: relative;
	margin: 0px;
	margin-left:-25px;
	left: 55px;
	bottom: 5px;
	color: black;
	width: 35px;
	height: 35px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	border: none;
}

.info-button:hover {
	transform: none;
    box-shadow: none;
}

.settings-btn {
  display: block;
  transition: transform 0.4s ease;
}

.settings-btn:hover {transform: rotate(60deg);}
@keyframes rot {
	from {transform: rotate(-100deg)} 
	to {transform: rotate(180deg)}
}

#info1 {padding-bottom: 10px}
#info2 {
	font-size: 15px;
	padding-top: 10px;
	text-align: center;}

button, 
input, 
textarea, 
select,
label,
.toggle-switch {
	-webkit-tap-highlight-color: transparent;
	outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;	
}  

.popup-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInOut 2.5s forwards;
    z-index: 9999;
    font-weight: bold;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

@keyframes fadeIn {
    0% { opacity: 0}
    15% { opacity: 1}
}

.modal2 {
	animation: fadeIn 2s forwards;
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

#wiresock {margin-top: -140px;grid-column: 2;}
#awg {margin-top: 15px;}
.toggle {
	display: inline-block;
	padding-top: 5px;
	margin-bottom:-5px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
	text-align: center;
	text-wrap: balance;
}

.toggle-switch {
	cursor: pointer;
	display: inline-block;
	background: #DCDCDC;
	border-radius: 16px;
	width: 58px;
	height: 32px;
	position: relative;
	vertical-align: middle;
	transition: background 0.25s;
	scale:81%;
	box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}

.toggle-switch:before, .toggle-switch:after {content: "";}
.toggle-switch:before {
	display: block;
	background: linear-gradient(to bottom, #fff 0%, #eee 100%);
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
	width: 24px;
	height: 24px;
	position: absolute;
	top: 4px;
	left: 4px;
	transition: left 0.25s;
}

.toggle:hover .toggle-switch:before {
	background: linear-gradient(to bottom, #fff 0%, #fff 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.toggle-checkbox:checked + .toggle-switch {background: #EF9551;}
.toggle-checkbox:checked + .toggle-switch:before {left: 30px;}
.toggle-checkbox {
	position: absolute;
	visibility: hidden;
}

.toggle-label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
	position: relative;
	top: 2px;
	padding-right: 20px;
}

.toggle-checkbox:disabled + .toggle-switch {
    opacity: 0.5;
    cursor: not-allowed;
    background: gray;
}

.toggle-checkbox:disabled + .toggle-switch:before {background: #ADB5BD;}
.toggle-checkbox:disabled ~ .toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-checkbox:disabled:hover + .toggle-switch:before {
    background: #ADB5BD;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

textarea:focus { outline: 1px solid #EF9551; }
textarea{
	border-radius: 2px;
	border: 1px solid #888891;
	max-height: 20px;
	resize:none;
	margin-bottom: -3px;
	max-width: 140px;
	white-space: nowrap; 
    overflow-y: hidden; 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.ipv6 {margin-right: 67px;}
.i1 {
	margin-left: 12px;
	width: 135px;
}

.keepalive-container, .i1 {
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.keepalive-container.visible, .i1.visible {
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
	opacity: 1;
    visibility: visible;
}

.options {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-out, margin 0.3s ease-out;
    margin-top: 0;
}

.options.show {
    max-height: 150px;
    opacity: 1;
	transition: max-height 0.2s ease-out, opacity 0.5s ease-out, margin 0.3s ease-out;
    margin-top: 10px;
}

.i2 {
	min-width: 100%;
	border: none;
	margin-top: 10px;
	white-space: wrap; 
	max-height: none;
	word-break: break-all;
	box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
	background-color: #F4F4F4;
}
.i2:focus { outline: none }

@media (max-width: 700px) {
	.i1 {
	width: 125px;
}
	
	.modal-content {
    max-width: 346px;
	min-width: 80%;
	}	
	
	#telegramButton,#projectsButton {
    max-width: 90%;
	width: 400px;
	}
	
	#info {
		display: block;
		max-width: 90%;
	}
	
	#optionsName {display: block ruby}
	.options.show {max-height: 200px}
	.toggle-label {padding-right: 0}
	#wiresock {display:none}
	#logo {max-width: 90%}   
    #status {display: none}
	#clash {margin-top: 0px;}
	.Sites {grid-template-columns: repeat(2, minmax(0, 1fr))}
	.dnsinfo {grid-template-columns: repeat(2, minmax(0, 1fr))}
	.grid-container {grid-template-columns: 1fr}
	.containerClash {order: 3}
}
		
@media (max-width: 350px) {
	.containerAWG, .containerClash {
		width: auto;
		margin: 0;
	}
	
	#keepname {
		display: block ruby;
		text-align: initial;
	}
	
	.grid-container {
        grid-template-columns: none;
        grid-auto-columns: 100%;
	}
	

	.info-button {left: 37px;}
}
