/**
 * Quick SERP Styling
 * Clean, minimal, dark mode
 */

:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --success: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
}

/* ==================== SCREENS ==================== */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex !important;
  flex-direction: column;
}

/* ==================== LOGIN PAGE ==================== */
#loginPage {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  align-items: center;
  justify-content: center;
}

.login-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: rgba(255, 255, 255, 0.7);
}

/* ==================== DASHBOARD PAGE ==================== */
#dashboardPage {
  background: var(--bg-dark);
}

.app-header {
  background: var(--bg-card);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.header-logo {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-content {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* ==================== CARDS & FORMS ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: white;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-grow {
  flex: 1;
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-block {
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

/* ==================== RESULTS ==================== */
.result-card {
  background: var(--bg-card);
  border-top: 4px solid var(--primary);
}

.result-title {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.serp-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.serp-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  gap: 1rem;
}

.serp-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

.serp-content {
  flex: 1;
  overflow: hidden;
}

.serp-title {
  display: block;
  font-size: 1.1rem;
  color: #60a5fa;
  text-decoration: none;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serp-title:hover {
  text-decoration: underline;
}

.serp-url {
  font-size: 0.85rem;
  color: var(--success);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serp-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==================== UTILS ==================== */
.error-message {
  color: #ef4444;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  display: none;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  transform: translateY(150%);
  transition: transform 0.3s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toast.show {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
