:root {
  --bg: #f0f4ff;
  --text: #1a1a2e;
  --card-bg: rgba(255,255,255,0.65);
  --card-border: rgba(255,255,255,0.25);
  --shadow: 0 8px 32px rgba(31,38,135,0.15);
  --accent: #4361ee;
}

[data-theme="night"] {
  --bg: #0f0f1a;
  --text: #e0e0ff;
  --card-bg: rgba(20,20,40,0.7);
  --card-border: rgba(100,100,255,0.15);
  --accent: #4895ef;
}

[data-theme="gold"] {
  --bg: linear-gradient(135deg, #1a0f00, #3c2a00);
  --text: #ffd700;
  --card-bg: rgba(60,40,20,0.65);
  --card-border: rgba(255,215,0,0.2);
  --accent: #fbbf24;
}

[data-theme="fire"] {
  --bg: #7f1d1d;
  --text: #fef3c7;
  --card-bg: rgba(120,40,40,0.6);
  --card-border: rgba(255,100,100,0.2);
  --accent: #ff6b6b;
}

body {
  margin: 0;
  font-family: 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 920px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.hero-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: block;
  margin: 0 auto 1.5rem;
}

h1.name {
  font-size: 3.2rem;
  text-align: center;
  margin: 0.5rem 0;
  line-height: 1.1;
}

.status {
  text-align: center;
  font-size: 1.4rem;
  opacity: 0.8;
  margin: 0.5rem 0;
}

.message {
  font-size: 1.35rem;
  line-height: 1.7;
  text-align: center;
  white-space: pre-wrap;
  margin: 2rem 0;
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-size: 1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  display: inline-block;
}

.btn.secondary {
  background: #ff6b6b;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}

/* Form elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

input, textarea, select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.3);
}

.alert {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.alert.danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Comments */
.comments-list {
  margin-top: 2rem;
}

.comment-item {
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 5px solid var(--accent);
}

.comment-item strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.comment-item time {
  font-size: 0.85rem;
  opacity: 0.7;
  display: block;
  margin-bottom: 0.6rem;
}

.empty-state {
  text-align: center;
  opacity: 0.7;
  font-style: italic;
  padding: 2rem 0;
}

/* Music control */
.music-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.music-control button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.2s;
}

.music-control button:hover {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 600px) {
  .card { padding: 1.5rem; }
  h1.name { font-size: 2.4rem; }
  .hero-photo { width: 140px; height: 140px; }
}


/* History Section Styles */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }
}

.history-card {
  max-height: 600px;
  overflow-y: auto;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.history-grid.extended {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.history-item {
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s;
  display: block;
}

.history-item:hover {
  transform: translateY(-5px);
}

.history-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.history-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
}

.theme-badge.pastel { background: #ffb3ba; }
.theme-badge.night { background: #4a4e6b; }
.theme-badge.gold { background: #ffd700; }
.theme-badge.fire { background: #ff6b6b; }

.history-info h3 {
  font-size: 1rem;
  margin: 0.3rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.history-stats {
  display: flex;
  gap: 0.8rem;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  opacity: 0.7;
}

.empty-history {
  text-align: center;
  padding: 3rem;
}

.empty-history i {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.file-input-wrapper {
  position: relative;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0.1px;
  height: 0.1px;
}

.file-label {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: white;
  border-radius: 40px;
  cursor: pointer;
  transition: 0.3s;
}

.file-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.file-name {
  margin-left: 1rem;
  opacity: 0.7;
}

.view-all-link {
  text-align: center;
  margin-top: 1.5rem;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.subtitle {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 2rem;
}
