/* Variables */
:root {
  --primary-color: #4285f4; /* Google Blue */
  --primary-hover: #3367d6;
  --text-color: #202124;
  --light-text: #5f6368;
  --error-color: #ea4335;
  --success-color: #34a853;
  --warning-color: #fbbc05;
  --border-color: #dfe1e5;
  --background: #ffffff;
  --shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  --font-family: 'Arial', sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif; /* Fallback */
  font-family: var(--font-family);
  color: #202124; /* Fallback */
  color: var(--text-color);
  background-color: #ffffff; /* Fallback */
  background-color: var(--background);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header & Logo */
header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  margin-bottom: 2rem;
}

.logo img {
  max-width: 200px;
  height: auto;
}

/* Form Styles */
.url-form {
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28); /* Fallback */
  box-shadow: var(--shadow);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #dfe1e5; /* Fallback */
  border: 1px solid var(--border-color);
  transition: box-shadow 0.3s ease;
}

.input-group:focus-within {
  box-shadow: 0 1px 12px rgba(32, 33, 36, 0.5);
}

input[type="url"] {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-color);
}

button {
  background-color: #4285f4; /* Fallback */
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #3367d6; /* Fallback */
  background-color: var(--primary-hover);
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Results Section */
.result {
  margin-top: 2rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease-in-out;
  display: none;
}

.result.show {
  display: block !important;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.result-title {
  font-size: 1.2rem;
  font-weight: bold;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.qr-code {
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qr-code canvas {
  display: block;
}

.short-url {
  background-color: white;
  padding: 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  word-break: break-all;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f1f3f4;
  color: var(--text-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-action:hover {
  background-color: #e8eaed;
}

/* Footer */
footer {
  text-align: center;
  margin-top: auto;
  padding: 1rem 0;
  color: var(--light-text);
  font-size: 0.9rem;
}

/* Notification */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  max-width: 300px;
  background-color: var(--success-color);
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transform: translateX(120%);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  background-color: var(--error-color);
}

.notification-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0 0 0.5rem;
}

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

/* Responsive */
@media (max-width: 600px) {
  .input-group {
    display: block; /* Fallback to block layout */
  }
  
  input[type="url"] {
    width: 100%;
    border-radius: 0;
    padding: 0.8rem;
  }
  
  button {
    width: 100%;
    border-radius: 0;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn-action {
    width: 100%;
    margin: 0.5rem 0;
  }
} 