:root {
  --bg-color: #f1f5f9;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: radial-gradient(circle at top right, #ffffff, transparent 40%),
                    radial-gradient(circle at bottom left, #f1f5f9, transparent 40%);
}

.app-container {
  width: 100%;
  max-width: 600px;
  padding: 1rem;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.4s ease-out;
}

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

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

.title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h1, h2, h3 {
  font-weight: 600;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

p {
  color: var(--text-muted);
  line-height: 1.5;
}

.icon {
  width: 24px;
  height: 24px;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--glass-border);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.input-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input-control:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.input-control {
  resize: vertical;
  min-height: 100px;
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

/* Voting Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.option-card {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.option-card:hover {
  background: rgba(0, 0, 0, 0.04);
}

.option-card.selected {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.option-text {
  font-weight: 500;
  z-index: 1;
}

.option-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.05);
  width: 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.avatars {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-left: 0.75rem;
}

.avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.tag {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Loader */
.loader {
  border: 3px solid rgba(0,0,0,0.1);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
