/* Reset styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: 'VazirmatnFD';
  src: url('Vazirmatn-FD-Regular.eot');  /* IE9 Compat Modes */
  src: local('☺'),
       url('Vazirmatn-FD-Regular.eot?#iefix') format('embedded-opentype'),  /* IE6-8 */
       url('Vazirmatn-FD-Regular.ttf') format('truetype'),
       url('Vazirmatn-FD-Regular.svg#VazirmatnFD') format('svg'),
       url('Vazirmatn-FD-Regular.woff2') format('woff2'),
       url('Vazirmatn-FD-Regular.woff') format('woff'),
       url('Vazirmatn-FD-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: 'VazirmatnFD', Tahoma, sans-serif;
  background: linear-gradient(135deg, #f7f9fc, #e3e8f0);
  min-height: 100vh;
  color: #333;
  display: flex;
  flex-direction: column;
  transition: background 0.5s, color 0.5s;
}

.custom-font {
  font-family: 'VazirmatnFD', Tahoma;
}

/* Dark mode styles */
body.dark-mode {
  background: #121212;
  color: #f1f1f1;
}

/* Header styles */
header {
  position: relative;
  padding: 20px;
  text-align: center;
  background: transparent;
  z-index: 10;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 700;
}

#toggle-theme {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  cursor: pointer;
  background-color: #4CAF50;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 0.9em;
  transition: background 0.3s;
  z-index: 1000;
}

#toggle-theme:hover {
  background-color: #45a049;
}

/* Hero Section */
.hero {
  padding: 80px 20px;
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
  text-align: center;
  color: #222;
  clip-path: ellipse(100% 70% at 50% 30%);
  transition: background 0.5s;
}

body.dark-mode .hero {
  background: linear-gradient(135deg, #444 0%, #222 100%);
}

.hero h2 {
  font-size: 2.8em;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero p {
  font-size: 1.2em;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
  color: #555;
}

/* Shortener Section */
.shortener-section {
  padding: 60px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}

body.dark-mode .shortener-section {
  background: #222;
}

.shortener-container {
  max-width: 800px;
  width: 100%;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: background 0.5s, box-shadow 0.5s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Form styles */
#shorten-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#short-url-result {
  display: flex;
  display: none;	
  flex-direction: column;
  align-items: center; /* Horizontal center */
  justify-content: center; /* Vertical center if height is set */
  min-height: 100px; /* or any height you prefer */
  position: relative;
  text-align: center;
}

#short-url-result span {
  margin-top: 10px;
  font-weight: bold;
}

.input-group {
  display: flex;
  align-items: center;
  background: transparent;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  transition: border-color 0.3s;
}

/* input styles continue */
input[type="url"] {
  flex: 1;
  font-size: 1em;
  padding: 8px 10px;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  direction: ltr;
  text-align: left;
}

input[type="url"]::placeholder {
  color: #aaa;
}

input[type="url"]:focus {
  outline: none;
}

/* Icon inside input */
.input-group i {
  margin-right: 10px;
  font-size: 1.2em;
  color: #888;
}

/* Submit button styles */
button {
  padding: 14px;
  border: none;
  border-radius: 8px;
  background-color: #4CAF50;
  color: #fff;
  font-family: inherit;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

button i {
  margin-right: 8px;
  font-size: 1.2em;
}

button:hover {
  background-color: #45a049;
}

/* Result display styles */
.result {
  margin-top: 25px;
  font-size: 1.2em;
  word-break: break-all;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.05);
  transition: background 0.3s;
}

body.dark-mode .result {
  background: rgba(255,255,255,0.1);
}

/* Features Section */
.features {
  padding: 60px 20px;
  background: #f0f4f8;
  transition: background 0.5s;
}

body.dark-mode .features {
  background: #222;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.feature {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: background 0.3s, box-shadow 0.3s;
  text-align: center;
}

body.dark-mode .feature {
  background: #444;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

.feature i {
  font-size: 2em;
  margin-bottom: 15px;
  color: #4CAF50;
  transition: color 0.3s;
}

body.dark-mode .feature i {
  color: #66ccff;
}

.feature h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  font-weight: 600;
}

.feature p {
  font-size: 1em;
  line-height: 1.4;
  color: inherit;
}

/* Call to Action Section */
.cta {
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  border-radius: 12px;
  margin: 40px 0;
  transition: background 0.5s;
  color: #fff;
}

body.dark-mode .cta {
  background: linear-gradient(135deg, #444 0%, #222 100%);
}

.cta h2 {
  font-size: 2.5em;
  margin-bottom: 15px;
  font-weight: 700;
}

.cta p {
  font-size: 1.2em;
  margin-bottom: 25px;
}

.btn-primary {
 padding: 14px 28px;
  background-color: #4CAF50;
  color: white;
  font-size: 1.2em;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #45a049;
  transform: translateY(-2px);
}

/* Footer styles */
footer {
  padding: 20px;
  text-align: center;
  font-size: 0.9em;
  color: #888;
  background: transparent;
  margin-top: auto;
}

/* Responsive adjustments for smaller screens */
@media(max-width: 768px){
  body {
    padding: 10px;
  }

  .hero h2 {
    font-size: 2em;
  }
  
  .cta h2 {
    font-size: 2em;
  }
}
