@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #6366f1; /* Electric Indigo - 30% accent */
  --primary-hover: #4f46e5;
  --bg-70: #ffffff; /* 70% White */
  --bg-subtle: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-70);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/cloudsend_bg.png') no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  z-index: -1;
}

header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.3s;
}

nav a.active {
  color: var(--primary);
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.btn-signin {
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-signin:hover {
  background: var(--primary);
  color: white;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
}

/* Home Page / Hero Section */
.hero-section {
  text-align: center;
  max-width: 800px;
  margin-bottom: 60px;
  animation: fadeIn 0.8s ease-out;
}

.hero-section h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-main);
}

.hero-section h1 span {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
}

.hero-actions .download-btn {
  max-width: 250px;
  text-decoration: none;
  display: inline-block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* About Page */
.about-container {
  max-width: 800px;
  width: 100%;
  background: var(--bg-subtle);
  padding: 60px;
  border-radius: 32px;
  border: 1px solid var(--border);
  animation: fadeIn 0.8s ease-out;
}

.about-content h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.about-item h4 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.about-item p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Transfer Page */
.transfer-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1000px;
  width: 100%;
  animation: fadeIn 0.5s ease-out;
}

@media (max-width: 768px) {
  .transfer-container {
    grid-template-columns: 1fr;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-container {
    padding: 30px;
  }
}

.widget {
  background: var(--bg-subtle);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s;
}

.widget.drag-active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  transform: scale(1.02);
}

.widget h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--text-main);
}

.file-list {
  width: 100%;
  margin-top: 20px;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.file-item span:first-child {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.remove-file {
  color: #ef4444;
  cursor: pointer;
  font-weight: 700;
}

#display-key {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#display-key:hover {
  transform: scale(1.1);
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Footer info */
.features {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: 100%;
  max-width: 1000px;
}

.feature-card {
  text-align: center;
}

.feature-card h3 {
  margin-bottom: 12px;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Send Widget */
.upload-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
  margin-bottom: 20px;
  border: none;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.upload-btn:hover {
  transform: scale(1.05) rotate(90deg);
  background: var(--primary-hover);
}

.file-info {
  text-align: center;
  color: var(--text-muted);
}

/* Receive Widget */
.input-key {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: 2px solid var(--border);
  font-size: 1.1rem;
  font-family: inherit;
  margin-bottom: 20px;
  outline: none;
  transition: border-color 0.3s;
  text-align: center;
  letter-spacing: 2px;
}

.input-key:focus {
  border-color: var(--primary);
}

.download-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.download-btn:hover {
  background: var(--primary-hover);
}

/* History Page */
.history-container {
    max-width: 800px;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

.history-content h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.history-content p {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    background: var(--bg-subtle);
    padding: 20px 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.history-info {
    display: flex;
    flex-direction: column;
}

.history-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-files {
    font-weight: 600;
    color: var(--text-main);
}

.history-key {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.history-status {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.history-status.sent {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.history-status.received {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.empty-history {
    text-align: center;
    padding: 60px;
    background: var(--bg-subtle);
    border-radius: 32px;
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 100px);
    background: var(--text-main);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, 0);
}
