@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --primary: #ff9a9e;
  --secondary: #fecfef;
  --accent: #a18cd1;
  --background: #fdfbfb;
  --text-dark: #2d3436;
  --text-light: #636e72;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, var(--background) 0%, #ebedee 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Dynamic Animated Background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 20%),
              radial-gradient(circle, var(--accent) 0%, transparent 20%);
  background-position: 0 0, 50px 50px;
  background-size: 100px 100px;
  opacity: 0.1;
  z-index: -1;
  animation: moveBg 20s linear infinite;
}

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

h1, h2, h3 {
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
}

/* Header & Nav */
header {
  position: sticky;
  top: 20px;
  z-index: 100;
  margin: 0 auto;
  max-width: 1200px;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 50px;
  transition: all 0.3s ease;
}

header h1 {
  font-size: 1.8rem;
  margin: 0;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  margin-left: 20px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.section {
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

.section h2 {
  font-size: 2rem;
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.05) rotate(2deg);
}

/* Buttons */
button {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}

button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 154, 158, 0.6);
}

/* Pomodoro */
.pomodoro {
  text-align: center;
}

#timer {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  margin: 20px 0;
  font-variant-numeric: tabular-nums;
}

/* News Carousel */
.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  transition: transform 0.4s ease;
}

.carousel-track li.news-card {
  flex: 0 0 calc(25% - 15px);
  min-width: 180px;
  background: rgba(255,255,255,0.75);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.carousel-track li.news-card:hover {
  transform: translateY(-4px);
}

.carousel-track li.news-card img {
  width: 95%;
  height: 180px;
  object-fit: cover;
  background: #eee;
}

.carousel-track li.news-card .card-body {
  padding: 13px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.carousel-track li.news-card .card-body h3 {
  font-size: 0.95rem;
  margin: 0 0 8px 0;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.4;
}

.carousel-track li.news-card .card-body p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.carousel-track li.news-card .card-body a {
  text-align: center;
  display: block;
  padding: 6px 10px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.carousel-track li.news-card .card-body a:hover {
  opacity: 0.9;
}

.carousel-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 1.2rem;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: rgba(255,255,255,0.95);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

@media (max-width: 900px) {
  .carousel-track li.news-card {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 550px) {
  .carousel-track li.news-card {
    flex: 0 0 100%;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin: 40px 20px 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    border-radius: 24px;
  }
  
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  nav a {
    margin: 0;
  }
}
