/* styles.css */

/* Import polices */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700&family=Poppins:wght@300;400;600;700&display=swap');

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  width: 100%;
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #e0e5ec, #cbd6e2);
  color: #333;
}

/* Animations */
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.3s;
}
.btn-primary {
  background: rgba(0,136,255,0.8);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,136,255,0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,136,255,0.5);
}
.btn-secondary {
  background: rgba(255,255,255,0.3);
  color: #0048ff;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.5);
}

/* Glass float card */
.glass-float {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.1),
    inset 0 0 1px rgba(255,255,255,0.5);
  padding: 2rem;
  animation: fadeIn 0.6s ease-out both,
             float 3s ease-in-out infinite;
}

/* Pages */
.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.login-card {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Inputs */
input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
  font-size: 1rem;
  transition: background 0.3s;
}
input:focus, textarea:focus {
  background: rgba(255,255,255,0.35);
  outline: none;
}

/* Errors */
.error {
  color: #d6336c;
  font-size: 0.9rem;
}

/* Container */
.container {
  width: 90%;
  max-width: 960px;
  margin: 3rem auto;
  animation: fadeIn 0.8s ease-out;
}

/* Select page */
.families-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Header Portal */
.header-portal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.role-label {
  padding: 0.4rem 0.8rem;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  color: #fff;
}

/* Sections Portal */
.section-portal {
  margin-bottom: 2rem;
  padding: 1rem;
}
.portal-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Chat */
.chat-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
}
.chat-msg {
  padding: 0.6rem;
  margin: 0.4rem 0;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-input {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Posts */
.post-controls {
  display: flex;
  gap: 0.5rem;
}
.feed-list .post {
  position: relative;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.post-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.3rem;
}
.btn-action {
  background: rgba(255,255,255,0.3);
  border: none;
  border-radius: 50%;
  padding: 0.4rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}
.btn-action:hover {
  background: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

/* Mini-Cloud */
.cloud-input {
  margin-bottom: 1rem;
}
.cloud-list .file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
  padding: 0.75rem;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.file-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: fadeIn 0.5s ease-out both;
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  cursor: pointer;
}
.members-list, .families-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.fam-btn {
  min-width: 140px;
}

/* Responsive */
@media (max-width: 768px) {
  .portal-content {
    display: flex;
    flex-direction: column;
  }
  .header-portal {
    flex-direction: column;
    gap: 1rem;
  }
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: flex-start;
}

.upload-box {
  background: rgba(255, 255, 255, 0.15);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 1.2rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.upload-box:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #00c3ff;
}

.upload-box input[type="file"] {
  display: none;
}

.upload-popup {
  background: rgba(0, 255, 150, 0.15);
  border: 1px solid rgba(0, 255, 150, 0.4);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  color: #0f0;
  font-weight: 600;
  transition: opacity 0.5s ease;
}

.upload-popup.hidden {
  display: none;
}

