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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1.6;
  color: #2c3e50;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e4e4e7;
}

main {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Profile Card */
.profile-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  width: 100%;
  max-width: 900px;
  height: auto;
  position: relative;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

body.dark-mode .profile-card {
  background: #1e293b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .profile-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  font-size: 24px;
}

.theme-toggle:hover {
  background: #e2e8f0;
  transform: rotate(20deg) scale(1.1);
}

.theme-toggle:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.theme-icon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.light-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.dark-icon {
  opacity: 0;
  transform: rotate(180deg);
}

body.dark-mode .theme-toggle {
  background: #334155;
  border-color: #475569;
}

body.dark-mode .theme-toggle:hover {
  background: #475569;
}

body.dark-mode .light-icon {
  opacity: 0;
  transform: rotate(-180deg);
}

body.dark-mode .dark-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.card-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Avatar */
.avatar-container {
  margin-bottom: 24px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.avatar-image {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  object-fit: cover;
  border: 4px solid #f0f0f0;
  transition: transform 0.3s ease;
}

body.dark-mode .avatar-image {
  border-color: #334155;
}

.avatar-image:hover {
  transform: scale(1.05);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-size: 13px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: #e0f2fe;
  border-color: #3b82f6;
  color: #1e40af;
}

.contact-item:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

body.dark-mode .contact-item {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .contact-item:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #93c5fd;
}

.contact-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.contact-text {
  font-weight: 500;
  word-break: break-all;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Profile Header */
.profile-header {
  text-align: center;
  margin-bottom: 24px;
}

.user-name {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 0.3s ease;
}

body.dark-mode .user-name {
  color: #f1f5f9;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
}

.user-bio {
  font-size: 16px;
  color: #64748b;
  line-height: 1.5;
  transition: color 0.3s ease;
}

body.dark-mode .user-bio {
  color: #94a3b8;
}

/* Time Display */
.time-display {
  background: #f1f5f9;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  border-left: 4px solid #3b82f6;
  transition: background 0.3s ease;
}

body.dark-mode .time-display {
  background: #0f172a;
}

.time-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

body.dark-mode .time-label {
  color: #94a3b8;
}

.user-time {
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  display: block;
  transition: color 0.3s ease;
}

body.dark-mode .user-time {
  color: #e2e8f0;
}

/* Social Links */
nav {
  margin-bottom: 24px;
}

.social-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

body.dark-mode .social-link {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .social-link:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.social-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

body.dark-mode .social-link img {
  filter: brightness(0) invert(1);
}

.social-link:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateX(4px);
}

.social-link:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Interests Sections */
.interests-section {
  margin-bottom: 24px;
}

.interests-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  transition: color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .section-title {
  color: #f1f5f9;
  border-bottom-color: #334155;
}

.interests-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interests-list li {
  background: #f1f5f9;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  color: #475569;
  transition: all 0.3s ease;
}

.hobbies-list li:hover {
  background: #dbeafe;
  color: #1e40af;
  transform: translateY(-2px);
}

.dislikes-list li {
  background: #fef2f2;
}

.dislikes-list li:hover {
  background: #fee2e2;
  color: #991b1b;
  transform: translateY(-2px);
}

body.dark-mode .interests-list li {
  background: #0f172a;
  color: #cbd5e1;
}

body.dark-mode .hobbies-list li:hover {
  background: #1e3a8a;
  color: #93c5fd;
}

body.dark-mode .dislikes-list li {
  background: #450a0a;
  color: #fca5a5;
}

body.dark-mode .dislikes-list li:hover {
  background: #7f1d1d;
  color: #fecaca;
}

/* Desktop Layout */
@media (min-width: 769px) {
  main {
    padding: 40px;
  }

  .card-content {
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
  }

  .avatar-container {
    margin-bottom: 0;
  }

  .avatar-image {
    width: 240px;
    height: 240px;
  }

  .contact-info {
    width: 240px;
  }

  .profile-info {
    flex: 1;
    min-width: 0;
  }

  .profile-header {
    text-align: left;
  }

  .user-name {
    justify-content: flex-start;
  }
}

/* Tablet Layout */
@media (max-width: 768px) {
  .card-content {
    padding: 30px 24px;
  }

  .avatar-image {
    width: 150px;
    height: 150px;
  }

  .avatar-container {
    margin-top: 30px;
    flex-direction: row;
  }

  .user-name {
    font-size: 24px;
  }

  .social-links {
    grid-template-columns: 1fr;
  }
}

/* Mobile Layout */
@media (max-width: 480px) {
  body {
    padding: 0;
  }

  main {
    padding: 0;
    height: 100vh;
  }

  .profile-card {
    border-radius: 0;
    height: 100vh;
    max-width: 100%;
  }

  .card-content {
    padding: 24px 20px;
    overflow-y: auto;
    height: 100%;
  }

  .avatar-container {
    margin-top: 50px;
    flex-direction: row;
  }

  .avatar-image {
    width: 120px;
    height: 120px;
  }

  .user-name {
    font-size: 22px;
  }

  .user-bio {
    font-size: 15px;
  }

  .card-content::-webkit-scrollbar {
    width: 4px;
  }

  .card-content::-webkit-scrollbar-track {
    background: transparent;
  }

  .card-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
