/*
 * CryptDrop - Modern Dark Mode Design
 * Professional, clean aesthetic with smooth interactions
 */

:root {
  /* Primary Colors */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #242424;
  
  /* Text Colors */
  --text-primary: #e8e8e8;
  --text-secondary: #a8a8a8;
  --text-muted: #717171;
  
  /* Accent Colors */
  --accent-main: #5b8ff5;
  --accent-light: #7b9ff8;
  --accent-dark: #4a6fd4;
  --accent-hover: #6a94f7;
  
  /* Status Colors */
  --success: #4caf50;
  --error: #f44336;
  --warning: #ff9800;
  --info: #2196f3;
  
  /* Borders & Shadows */
  --border-color: #333333;
  --border-light: #404040;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Container */
.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .container {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }
}

/* Card Component */
.card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .card {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
  }
}

/* Typography */
h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }
}

/* Forms */
.form-group {
  margin-bottom: 1.75rem;
}

.form-group:nth-child(1) { }
.form-group:nth-child(2) { }
.form-group:nth-child(3) { }
.form-group:nth-child(4) { }
.form-group:nth-child(5) { }

label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

input,
textarea {
  width: 100%;
  padding: 0.95rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus {
  border-color: var(--accent-main);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(91, 143, 245, 0.1);
}

textarea {
  min-height: 150px;
  resize: vertical;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  letter-spacing: 0.3px;
}

@media (max-width: 480px) {
  input,
  textarea {
    padding: 0.85rem 1rem;
    font-size: 16px;
  }
}

/* Buttons */
button,
.button {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-dark));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.95rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(91, 143, 245, 0.25);
  text-transform: none;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--transition-normal), height var(--transition-normal);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(91, 143, 245, 0.35);
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: linear-gradient(135deg, var(--border-light), var(--border-color));
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 143, 245, 0.3);
}

@media (max-width: 480px) {
  button,
  .button {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Display Areas */
.link-container,
.message-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
  word-break: break-all;
  transition: all var(--transition-fast);
  animation: slideUp var(--transition-normal) ease-out backwards;
}

.link-container {
  animation-delay: 0.2s;
}

.link-container:hover,
.message-box:hover {
  border-color: var(--accent-main);
  background: var(--bg-tertiary);
  box-shadow: 0 0 16px rgba(91, 143, 245, 0.1);
}

.message-box {
  white-space: pre-wrap;
  line-height: 1.5;
  letter-spacing: 0.2px;
}

/* Utility Classes */
.copy-btn {
  width: 100%;
  margin-top: 1rem;
}

.success-msg {
  color: var(--success);
  font-weight: 600;
}

.error-msg {
  color: var(--error);
  font-weight: 600;
}

/* Loading States */
.loading {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
}

.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(91, 143, 245, 0.15);
  border-top-color: var(--accent-main);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

.loading p {
  color: var(--accent-main);
  font-weight: 500;
  margin: 1rem 0 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notifications & Alerts */
.error-display,
.success-notification,
.validation-errors {
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  transition: all var(--transition-fast);
  animation: slideDown var(--transition-normal) ease-out;
}

.error-display {
  background: rgba(244, 67, 54, 0.08);
  border-left-color: var(--error);
  border: 1px solid var(--border-color);
}

.success-notification {
  background: rgba(76, 175, 80, 0.08);
  border-left-color: var(--success);
  border: 1px solid var(--border-color);
}

.validation-errors {
  background: rgba(244, 67, 54, 0.08);
  border-left-color: var(--error);
  border: 1px solid var(--border-color);
}

.error-display h3,
.validation-errors h4 {
  color: var(--error);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.success-notification p {
  color: var(--success);
  font-weight: 600;
  margin: 0;
}

.error-display p,
.validation-errors li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.validation-errors ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

.validation-errors li {
  margin: 0.3rem 0;
  list-style: disc;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  min-width: 300px;
  max-width: 400px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  z-index: 10000;
  box-shadow: var(--shadow-md);
  animation: toastSlideIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: all var(--transition-fast);
}

.toast.hidden {
  animation: toastSlideOut 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--error);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast.info {
  border-left-color: var(--info);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(450px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(450px);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    min-width: auto;
  }
}

/* File Attachments */
.attachment-section {
  border: 2px dashed var(--accent-main);
  border-radius: 8px;
  padding: 2rem;
  background: rgba(91, 143, 245, 0.04);
  margin: 1.5rem 0;
  transition: all var(--transition-normal);
  text-align: center;
  cursor: pointer;
}

.attachment-section:hover {
  border-color: var(--accent-light);
  background: rgba(91, 143, 245, 0.08);
  box-shadow: 0 0 16px rgba(91, 143, 245, 0.1);
}

.attachment-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.attachment-label:hover {
  color: var(--accent-main);
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.file-button {
  background: transparent;
  border: 1px solid var(--accent-main);
  color: var(--accent-main);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.file-button:hover {
  background: var(--accent-main);
  color: white;
  box-shadow: 0 4px 12px rgba(91, 143, 245, 0.25);
}

.hidden-file-input {
  display: none;
}

.file-details {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  animation: slideUp var(--transition-normal) ease-out;
}

.file-preview-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.file-preview {
  max-width: 100%;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
}

.file-preview .file-icon {
  font-size: 3.5rem;
  color: var(--accent-main);
}

.file-info {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.file-info p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.remove-file {
  background: var(--error);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  margin-top: 1rem;
}

.remove-file:hover {
  background: #e53935;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.25);
}

/* Message Attachments */
.attachment-container {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  transition: all var(--transition-fast);
}

.attachment-download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.attachment-download:hover {
  border-color: var(--accent-main);
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.attachment-icon {
  font-size: 1.75rem;
  color: var(--accent-main);
}

.attachment-meta {
  display: flex;
  flex-direction: column;
}

.attachment-name {
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
  max-width: 200px;
}

.attachment-size {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.download-button {
  background: var(--accent-main);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  font-size: 0.9rem;
}

.download-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(91, 143, 245, 0.25);
}

/* Confirmation */
.confirm-view-container {
  text-align: center;
  padding: 2rem 0;
}

.confirm-message {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.confirm-view-btn {
  background: linear-gradient(135deg, var(--error), #e53935);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.25);
}

.confirm-view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 67, 54, 0.35);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent-main);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-light);
  transition: width var(--transition-fast);
}

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

.footer-links a:hover::after {
  width: 100%;
}

/* Policy & FAQ Sections */
.policy-section,
.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.policy-section:last-child,
.faq-item:last-child {
  border-bottom: none;
}

.policy-section h2,
.faq-item h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-main);
}

.policy-section ul,
.faq-item ul {
  margin-left: 1.5rem;
  margin-top: 0.75rem;
}

.policy-section li,
.faq-item li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Navigation Links */
.navigation-links {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.navigation-links a {
  color: var(--accent-main);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.navigation-links a:hover {
  color: var(--accent-light);
}

/* Utilities */
.warning {
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

/* Form Errors */
.form-group.error input,
.form-group.error textarea {
  border-color: var(--error);
  background: rgba(244, 67, 54, 0.04);
}

.field-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: block;
  animation: slideDown var(--transition-fast) ease-out;
}

/* Forensics & Changelog */
.forensics-section,
.changelog-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.forensics-section:last-child,
.changelog-section:last-child {
  border-bottom: none;
}

.forensics-section h2,
.changelog-section h2 {
  color: var(--accent-main);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.forensics-section h3,
.changelog-section h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.code-snippet {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
}

.changelog-section ul {
  margin-left: 1.5rem;
  margin-top: 0.75rem;
}

/* Responsive Tables */
@media (max-width: 640px) {
  .toast {
    min-width: calc(100% - 2rem);
    right: 1rem;
    left: 1rem;
  }
  
  .footer-links {
    gap: 1rem;
  }
  
  .navigation-links {
    flex-direction: column;
  }
}

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

/* Selection */
::selection {
  background: var(--accent-main);
  color: white;
}

::-moz-selection {
  background: var(--accent-main);
  color: white;
}
