:root {
  /* Dark Theme Colors */
  --bg-primary: #202221;
  --bg-secondary: #303531;
  --text-primary: #FFFFFF;
  --text-secondary: #4D574E;
  --accent-primary: #B6884B;
  --accent-secondary: #956E2F;
  --accent-tertiary: #654922;
  --shadow-color: rgba(181, 136, 75, 0.3);
  
  /* Light Theme Colors */
  --bg-primary-light: #f8f9fa;
  --bg-secondary-light: #ffffff;
  --text-primary-light: #212529;
  --text-secondary-light: #6c757d;
  --shadow-color-light: rgba(149, 110, 47, 0.2);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  transition: all 0.3s ease;
  overflow-x: hidden;
}

body.light-theme {
  --bg-primary: var(--bg-primary-light);
  --bg-secondary: var(--bg-secondary-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --shadow-color: var(--shadow-color-light);
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.background-overlay.active {
  opacity: 0.3;
}

.background-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  opacity: 0.8;
  z-index: 1;
}

.rgb-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 400% 400%;
  animation: rgbShift 10s ease infinite;
}

.rgb-background.active {
  opacity: 0.1;
}

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

.settings-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  position: relative;
}

.settings-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-btn:hover {
  background: var(--accent-primary);
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--shadow-color);
}

.settings-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.settings-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.settings-option {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  text-align: left;
}

.settings-option:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.settings-option:first-child {
  border-radius: 10px 10px 0 0;
}

.settings-option:last-child {
  border-radius: 0 0 10px 10px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.editor-modal {
  max-width: 600px;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--accent-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="color"],
.form-group input[type="file"] {
  width: 100%;
  padding: 12px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-tertiary);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input[type="color"] {
  height: 50px;
  cursor: pointer;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--shadow-color);
}

.rgb-btn {
  width: 100%;
  padding: 12px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.rgb-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.rgb-btn.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Profile Upload Area */
.profile-upload-area {
  position: relative;
  display: inline-block;
}

.upload-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid var(--accent-primary);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.upload-preview:hover .upload-overlay {
  opacity: 1;
}

.upload-overlay i {
  color: white;
  font-size: 24px;
}

#profilePictureUpload {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Form Sections */
.form-section {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--accent-tertiary);
}

.form-section h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.social-link-item,
.section-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.section-item .section-name {
  flex: 1;
}

.section-item .section-url {
  flex: 2;
}

.social-link-item input {
  flex: 1;
}

.remove-btn {
  background: #dc3545;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
}

.remove-btn:hover {
  background: #c82333;
  transform: scale(1.05);
}

.add-btn {
  background: var(--accent-primary);
  border: none;
  color: var(--bg-primary);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.add-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--accent-tertiary);
}

.cancel-btn {
  background: var(--bg-primary);
  border: 2px solid var(--text-secondary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background: var(--text-secondary);
  color: var(--bg-primary);
}

.save-btn {
  background: var(--accent-primary);
  border: none;
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.save-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.container {
  max-width: 400px;
  margin: 0 auto;
  padding: 80px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* Profile Section */
.profile-section {
  text-align: center;
  margin-bottom: 40px;
}

.profile-picture {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 25px;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-primary);
  box-shadow: 0 0 30px var(--shadow-color);
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 30px var(--shadow-color);
  }
  50% {
    box-shadow: 0 0 40px var(--accent-primary), 0 0 60px var(--shadow-color);
  }
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.profile-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  opacity: 0.9;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 25px;
  margin-bottom: 40px;
  justify-content: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: 50%;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: linear-gradient(45deg, var(--accent-tertiary), var(--accent-primary));
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.social-icon:hover {
  color: var(--accent-secondary);
  border-color: var(--accent-primary);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.social-icon:hover::before {
  width: 100%;
  height: 100%;
}

/* Links Section */
.links-section {
  width: 100%;
  margin-bottom: 40px;
}

.link-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 25px;
  margin-bottom: 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  gap: 15px;
}

.link-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-primary));
  opacity: 0;
  transition: all 0.4s ease;
  z-index: -1;
}

.link-button i {
  font-size: 18px;
  transition: all 0.3s ease;
}

.link-button:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 15px 35px var(--shadow-color), 0 0 20px var(--accent-secondary);
}

.link-button:hover::before {
  opacity: 1;
}

.link-button:hover i {
  transform: scale(1.2);
  color: var(--text-primary);
}

.link-button:active {
  transform: translateY(-2px) scale(0.98);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: auto;
  padding-top: 20px;
}

.footer p {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.8;
}

.footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 60px 15px 30px;
  }
  
  .profile-name {
    font-size: 1.8rem;
  }
  
  .profile-tagline {
    font-size: 0.9rem;
  }
  
  .social-icons {
    gap: 20px;
  }
  
  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .link-button {
    padding: 16px 20px;
    font-size: 15px;
  }
  
  .settings-menu {
    top: 15px;
    right: 15px;
  }
  
  .settings-btn {
    width: 45px;
    height: 45px;
    font-size: 14px;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .social-link-item,
  .section-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 320px) {
  .container {
    padding: 50px 10px 25px;
  }
  
  .profile-picture {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: 1.6rem;
  }
  
  .social-icons {
    gap: 15px;
  }
  
  .link-button {
    padding: 14px 18px;
    font-size: 14px;
  }
  
  .settings-dropdown {
    right: -50px;
    min-width: 180px;
  }
}

/* Smooth Transitions for Theme Changes */
body, .settings-btn, .social-icon, .link-button, .profile-name, .profile-tagline, .footer p {
  transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}
.settings-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
