:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --dark-bg: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --text-light: #f8fafc;
  --text-gray: #94a3b8;
  --accent: #8b5cf6;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 30px 60px rgba(139, 92, 246, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--dark-bg);
  width: 100%;
  overflow: hidden;
  position: relative;
}

.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.bg-circle:nth-child(1) {
  width: 500px;
  height: 500px;
  top: -150px;
  left: -150px;
  background: #667eea;
  animation-delay: 0s;
}

.bg-circle:nth-child(2) {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -100px;
  background: #764ba2;
  animation-delay: 7s;
}

.bg-circle:nth-child(3) {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 80%;
  background: #f5576c;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(-50px, -50px) rotate(120deg);
  }
  66% {
    transform: translate(50px, 50px) rotate(240deg);
  }
}

.ring {
  position: relative;
  width: 900px;
  height: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ring i {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(255, 255, 255, 0.3);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ring i:nth-child(1) {
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  animation: animate 8s linear infinite;
}

.ring i:nth-child(2) {
  border-radius: 41% 44% 56% 59% / 38% 62% 63% 37%;
  animation: animate 6s linear infinite reverse;
}

.ring i:nth-child(3) {
  border-radius: 41% 44% 56% 59% / 38% 62% 63% 37%;
  animation: animate2 12s linear infinite;
}

.ring:hover i {
  border-width: 8px;
  filter: drop-shadow(0 0 40px var(--accent));
}

@keyframes animate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes animate2 {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.login-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 900px;
  z-index: 1;
  position: relative;
}

.login-block {
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  width: 320px;
  height: 400px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.login-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: 0.5s;
}

.login-block:hover::before {
  left: 100%;
}

.login-block:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.login-block h2 {
  color: var(--text-light);
  font-size: 32px;
  margin-bottom: 20px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-block p {
  color: var(--text-gray);
  font-size: 18px;
  margin-bottom: 40px;
}

.login-btn {
  padding: 18px 45px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 20px 50px rgba(102, 126, 234, 0.6);
  letter-spacing: 1px;
}

.center-github {
  width: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.center-github-img {
  width: 350px;
  opacity: 0.4;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: pulse 3s infinite;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

.center-github-img:hover {
  opacity: 0.8;
  transform: scale(1.2) rotate(15deg);
  filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.4));
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    opacity: 0.4;
  }
  50% { 
    transform: scale(1.15) rotate(5deg);
    opacity: 0.7;
  }
}

.author-section {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    animation: slideInRight 1s 1.5s forwards;
    padding: 15px;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.author-section:hover {
  transform: translateX(-10px) scale(1.05);
  background: rgba(30, 41, 59, 0.9);
  border-color: #8b5cf6; 
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
}

.telegram-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(135deg, #08aeea, #2af598) border-box;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.author-section:hover .telegram-img {
  transform: scale(1.15) rotate(-10deg);
  box-shadow: 0 0 30px rgba(8, 174, 234, 0.6);
}

.author-desc {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0; 
}

.author-text {
  font-weight: 600;
  color: #e2e8f0; 
  font-size: 1.1rem;
  margin: 0;
  white-space: nowrap;
}

.author-subtext {
  color: #94a3b8; 
  font-size: 0.9rem;
  margin: 0;
  white-space: nowrap;
}

.author-section:hover .author-text {
  color: #08aeea;
}

.author-section:hover .author-subtext {
  color: #e2e8f0;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.close-telegram {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.close-telegram:hover {
  background: #ef4444;
  transform: scale(1.1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.loading-ring {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: 5px solid transparent;
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
  z-index: 10000;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.close-telegram {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.close-telegram:hover {
  background: #ef4444;
  transform: scale(1.1);
}

.author-section {
  position: fixed;
}

@media (max-width: 1024px) {
  .ring {
    width: 700px;
    height: 500px;
  }

  .login-container {
    width: 700px;
  }

  .login-block {
    width: 250px;
    height: 350px;
  }

  .center-github-img {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .ring {
    width: 100%;
    height: auto;
    flex-direction: column;
    gap: 40px;
  }

  .login-container {
    flex-direction: column;
    width: 100%;
    gap: 40px;
  }

  .center-github {
    order: -1;
  }

  .center-github-img {
    width: 200px;
  }

  .floating-telegram {
    bottom: 20px;
    right: 20px;
  }
}