/* style.css */
:root {
  --primary-color: #6c63ff;
  --primary-light: #a29bfe;
  --primary-dark: #4b44cc;
  --secondary-color: #ff6584;
  --accent-color: #63ff9e;
  --error-color: #ff4757;
  --text-color: #2d3436;
  --text-light: #636e72;
  --text-lighter: #b2bec3;
  --bg-color: #f9f9ff;
  --bg-secondary: #ffffff;
  --border-color: #dfe6e9;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(108, 99, 255, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 12px;
  --gradient: linear-gradient(135deg, #6c63ff 0%, #a29bfe 100%);
  --youtube-red: #ff0000;
}

[data-theme="dark"] {
  --text-color: #f5f6fa;
  --text-light: #dcdde1;
  --text-lighter: #7f8fa6;
  --bg-color: #1e272e;
  --bg-secondary: #2f3640;
  --border-color: #353b48;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 12px 40px rgba(108, 99, 255, 0.25);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
.tool-header {
  background: var(--gradient);
  padding: 2rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.15);
}

.tool-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
  background-size: cover;
}

.header-content {
  position: relative;
  z-index: 2;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(-3px);
}

.tool-meta h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
  font-weight: 700;
}

.tool-meta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  max-width: 600px;
}

/* Main Tool Styles */
.tool-main {
  flex: 1;
  padding-bottom: 3rem;
}

.tool-card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.tool-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

/* Section Styles */
.input-section,
.control-section,
.results-section,
.error-section {
  padding: 2rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
}

/* URL Input Styles */
.url-input-container {
  position: relative;
  display: flex;
  margin-bottom: 1rem;
}

.url-input {
  width: 100%;
  padding: 1rem 1.25rem;
  padding-right: 3.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: var(--bg-secondary);
  color: var(--text-color);
  transition: var(--transition);
}

.url-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.15);
}

.paste-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.paste-btn:hover {
  color: var(--primary-color);
  background: rgba(108, 99, 255, 0.1);
}

.url-examples {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
}

.url-examples span {
  font-weight: 500;
}

.url-examples button {
  background: none;
  border: none;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.url-examples button:hover {
  color: var(--primary-dark);
}

/* Control Section */
.control-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.convert-btn {
  width: 100%;
  max-width: 300px;
}

.manual-time {
  width: 100%;
  text-align: center;
}

.manual-time label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}

.time-inputs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.time-inputs input {
  width: 60px;
  padding: 0.5rem;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.time-inputs input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.15);
}

.time-inputs span {
  font-weight: bold;
  color: var(--text-light);
}

/* Results Section */
.results-section {
  display: none;
}

.result-card {
  margin-bottom: 2rem;
}

.timestamp-output {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  color: var(--primary-color);
}

.copy-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.video-info {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.thumbnail-container {
  width: 160px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-details {
  flex: 1;
}

.video-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Error Section */
.error-section {
  display: none;
}

.error-card {
  text-align: center;
  padding: 2rem;
}

.error-card i {
  font-size: 3rem;
  color: var(--error-color);
  margin-bottom: 1.5rem;
}

.error-message {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-copy {
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: rgba(108, 99, 255, 0.05);
  transform: translateY(-2px);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-tertiary:hover {
  background-color: rgba(255, 101, 132, 0.05);
  transform: translateY(-2px);
}

.btn-copy {
  background-color: transparent;
  color: var(--primary-color);
  padding: 0.5rem 1.25rem;
  font-weight: 500;
}

.btn-copy:hover {
  background-color: rgba(108, 99, 255, 0.05);
  transform: translateY(-2px);
}

/* Footer Styles */
footer {
  background: var(--bg-secondary);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col {
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-light);
  font-size: 1.25rem;
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.newsletter-form .input-group {
  display: flex;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: 0.9rem;
  background: var(--bg-color);
  color: var(--text-color);
}

.newsletter-form button {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 0 1.25rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .video-info {
    flex-direction: column;
  }
  
  .thumbnail-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
}

@media (max-width: 768px) {
  .tool-meta h1 {
    font-size: 2rem;
  }
  
  .tool-meta p {
    font-size: 1.1rem;
  }
  
  .input-section,
  .control-section,
  .results-section,
  .error-section {
    padding: 1.5rem;
  }
  
  .timestamp-output {
    font-size: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .tool-header {
    padding: 1.5rem 0;
  }
  
  .tool-meta h1 {
    font-size: 1.75rem;
    gap: 0.75rem;
  }
  
  .back-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .url-input {
    padding: 0.85rem 1rem;
    padding-right: 3rem;
  }
  
  .time-inputs input {
    width: 50px;
    padding: 0.4rem;
  }
  
  .timestamp-output {
    font-size: 1.75rem;
  }
  
  .video-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-links {
    gap: 1rem;
  }
  
  .back-to-top {
    width: 2.5rem;
    height: 2.5rem;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Add this to your HTML head to load Inter font */
/* <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> */