:root{
  --accent:#0b6efd;
  --accent-hover:#0956d1;
  --bg:#f6f7fb;
  --card:#ffffff;
  --muted:#666;
  --border:#e6e9ef;
  --error:#dc3545;
  --success:#28a745;
  --text-primary:#111;
  --text-secondary:#666;
  --shadow:0 6px 18px rgba(16,24,40,0.06);
  --shadow-lg:0 10px 40px rgba(16,24,40,0.12);
}

*{box-sizing:border-box}

body{
  font-family:Inter,Segoe UI,Arial,sans-serif;
  margin:0;
  background:var(--bg);
  color:var(--text-primary);
  line-height:1.6;
}

.wrap{max-width:1100px;margin:0 auto;padding:18px}

/* Header */
.site-header{
  background:#fff;
  border-bottom:1px solid var(--border);
  box-shadow:0 2px 4px rgba(0,0,0,0.02);
}

.logo{
  margin:0;
  padding:14px 0;
  display:inline-block;
  color:var(--accent);
  font-size:24px;
  font-weight:700;
}

.categories{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.categories button{
  background:transparent;
  border:0;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  color:var(--muted);
  transition:all 0.2s;
  font-size:14px;
}

.categories button:hover{
  background:rgba(11,110,253,0.1);
  color:var(--accent);
}

.categories button.active{
  background:var(--accent);
  color:#fff;
}

/* Hero Section */
.hero{
  padding:18px 0;
}

.hero h2{
  font-size:32px;
  margin:0 0 8px 0;
  color:var(--text-primary);
}

.hero p{
  color:var(--text-secondary);
  font-size:16px;
  margin:0;
}

/* News Grid */
.news-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:18px;
  padding-bottom:40px;
}

.card{
  background:var(--card);
  border-radius:10px;
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  transition:transform 0.2s, box-shadow 0.2s;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-lg);
}

.card img{
  width:100%;
  height:160px;
  object-fit:cover;
}

.card .body{
  padding:12px;
}

.meta{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.title{
  font-weight:600;
  margin:6px 0 8px;
  font-size:18px;
  line-height:1.4;
}

.excerpt{
  font-size:14px;
  color:#333;
  line-height:1.5;
}

.read-more{
  margin-top:12px;
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
  display:inline-block;
  transition:color 0.2s;
}

.read-more:hover{
  color:var(--accent-hover);
}

/* Footer */
.site-footer{
  background:#fff;
  border-top:1px solid var(--border);
  padding:14px 0;
  text-align:center;
  color:var(--muted);
  margin-top:40px;
}

/* Auth Pages - Login & Register */
.auth-container{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding:20px;
}

.auth-card{
  background:#fff;
  border-radius:16px;
  box-shadow:var(--shadow-lg);
  width:100%;
  max-width:420px;
  padding:40px;
  animation:fadeIn 0.4s ease;
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

.auth-header{
  text-align:center;
  margin-bottom:32px;
}

.auth-header h1{
  margin:0 0 8px 0;
  font-size:28px;
  color:var(--text-primary);
  font-weight:700;
}

.auth-header p{
  margin:0;
  color:var(--text-secondary);
  font-size:14px;
}

.auth-form{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.form-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-group label{
  font-weight:500;
  color:var(--text-primary);
  font-size:14px;
}

.form-group input{
  padding:12px 16px;
  border:2px solid var(--border);
  border-radius:8px;
  font-size:15px;
  transition:all 0.2s;
  font-family:inherit;
  background:#fff;
}

.form-group input:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(11,110,253,0.1);
}

.form-group input::placeholder{
  color:#999;
}

.auth-button{
  background:var(--accent);
  color:#fff;
  border:none;
  padding:14px 24px;
  border-radius:8px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
  margin-top:8px;
  font-family:inherit;
}

.auth-button:hover{
  background:var(--accent-hover);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(11,110,253,0.3);
}

.auth-button:active{
  transform:translateY(0);
}

.auth-message{
  padding:12px 16px;
  border-radius:8px;
  font-size:14px;
  text-align:center;
  margin-top:8px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.auth-message.error{
  background:#fee;
  color:var(--error);
  border:1px solid #fcc;
}

.auth-message.success{
  background:#efe;
  color:var(--success);
  border:1px solid #cfc;
}

.auth-message.info{
  background:#e3f2fd;
  color:var(--accent);
  border:1px solid #bbdefb;
}

.auth-footer{
  text-align:center;
  margin-top:24px;
  padding-top:24px;
  border-top:1px solid var(--border);
}

.auth-footer p{
  margin:0;
  color:var(--text-secondary);
  font-size:14px;
}

.auth-footer a{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
  transition:color 0.2s;
}

.auth-footer a:hover{
  color:var(--accent-hover);
  text-decoration:underline;
}

/* Back to home link in auth pages */
.auth-card > div:first-child a:hover{
  color:var(--accent);
}

/* Profile Page */
.profile-container{
  min-height:100vh;
  padding:40px 20px;
}

.profile-card{
  background:#fff;
  border-radius:16px;
  box-shadow:var(--shadow-lg);
  max-width:600px;
  margin:0 auto;
  padding:40px;
}

.profile-header{
  text-align:center;
  margin-bottom:32px;
  padding-bottom:24px;
  border-bottom:2px solid var(--border);
}

.profile-header h2{
  margin:0 0 8px 0;
  font-size:28px;
  color:var(--text-primary);
}

.profile-info{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:32px;
}

.info-item{
  display:flex;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid var(--border);
}

.info-item:last-child{
  border-bottom:none;
}

.info-label{
  font-weight:600;
  color:var(--text-secondary);
}

.info-value{
  color:var(--text-primary);
}

.logout-button{
  width:100%;
  background:#dc3545;
  color:#fff;
  border:none;
  padding:14px 24px;
  border-radius:8px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
  font-family:inherit;
}

.logout-button:hover{
  background:#c82333;
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(220,53,69,0.3);
}

/* Landing Page */
.landing-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.landing-wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
  width:100%;
}

/* Landing Header */
.landing-header{
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
  position:sticky;
  top:0;
  z-index:100;
}

.landing-header .landing-wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px;
}

.landing-logo{
  margin:0;
  font-size:28px;
  font-weight:700;
  color:var(--accent);
  display:flex;
  align-items:center;
  gap:8px;
}

.landing-nav{
  display:flex;
  gap:12px;
  align-items:center;
}

.nav-link{
  padding:10px 20px;
  text-decoration:none;
  color:var(--text-primary);
  font-weight:500;
  border-radius:8px;
  transition:all 0.2s;
}

.nav-link:hover{
  background:rgba(11,110,253,0.1);
  color:var(--accent);
}

.nav-link-primary{
  background:var(--accent);
  color:#fff;
}

.nav-link-primary:hover{
  background:var(--accent-hover);
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(11,110,253,0.3);
}

/* Landing Hero */
.landing-hero{
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#fff;
  padding:80px 0;
  flex:1;
}

.landing-hero .landing-wrap{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  align-items:center;
}

.hero-content{
  animation:fadeInLeft 0.6s ease;
}

.hero-title{
  font-size:48px;
  font-weight:700;
  margin:0 0 20px 0;
  line-height:1.2;
}

.hero-subtitle{
  font-size:20px;
  margin:0 0 40px 0;
  opacity:0.95;
  line-height:1.6;
}

.hero-buttons{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.btn{
  padding:16px 32px;
  border-radius:10px;
  text-decoration:none;
  font-weight:600;
  font-size:16px;
  display:inline-block;
  transition:all 0.3s;
  border:2px solid transparent;
  font-family:inherit;
  cursor:pointer;
}

.btn-primary{
  background:#fff;
  color:var(--accent);
  border-color:#fff;
}

.btn-primary:hover{
  background:rgba(255,255,255,0.95);
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(0,0,0,0.2);
}

.btn-secondary{
  background:transparent;
  color:#fff;
  border-color:#fff;
}

.btn-secondary:hover{
  background:rgba(255,255,255,0.1);
  transform:translateY(-2px);
}

.btn-large{
  padding:18px 40px;
  font-size:18px;
}

.btn-outline{
  background:transparent;
  color:#fff;
  border:2px solid #fff;
}

.btn-outline:hover{
  background:rgba(255,255,255,0.1);
}

.hero-image{
  display:flex;
  justify-content:center;
  align-items:center;
  animation:fadeInRight 0.6s ease;
}

.hero-illustration{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  justify-content:center;
}

.illustration-item{
  font-size:80px;
  background:rgba(255,255,255,0.2);
  width:120px;
  height:120px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(10px);
  border:2px solid rgba(255,255,255,0.3);
  transition:transform 0.3s;
}

.illustration-item:hover{
  transform:scale(1.1) rotate(5deg);
}

@keyframes fadeInLeft{
  from{
    opacity:0;
    transform:translateX(-30px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}

@keyframes fadeInRight{
  from{
    opacity:0;
    transform:translateX(30px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}

/* Features Section */
.landing-features{
  padding:80px 0;
  background:#fff;
}

.features-title{
  text-align:center;
  font-size:36px;
  font-weight:700;
  margin:0 0 60px 0;
  color:var(--text-primary);
}

.features-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:30px;
}

.feature-card{
  text-align:center;
  padding:40px 30px;
  border-radius:16px;
  background:var(--bg);
  transition:all 0.3s;
  border:2px solid transparent;
}

.feature-card:hover{
  transform:translateY(-8px);
  box-shadow:var(--shadow-lg);
  border-color:var(--accent);
}

.feature-icon{
  font-size:48px;
  margin-bottom:20px;
  display:block;
}

.feature-card h4{
  font-size:20px;
  font-weight:600;
  margin:0 0 12px 0;
  color:var(--text-primary);
}

.feature-card p{
  margin:0;
  color:var(--text-secondary);
  line-height:1.6;
}

/* CTA Section */
.landing-cta{
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#fff;
  padding:80px 0;
  text-align:center;
}

.cta-content h3{
  font-size:36px;
  font-weight:700;
  margin:0 0 16px 0;
}

.cta-content p{
  font-size:20px;
  margin:0 0 40px 0;
  opacity:0.95;
}

.cta-buttons{
  display:flex;
  gap:16px;
  justify-content:center;
  flex-wrap:wrap;
}

/* Landing Footer */
.landing-footer{
  background:#1a1a1a;
  color:#fff;
  padding:40px 0;
  text-align:center;
}

.landing-footer .landing-wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:20px;
}

.landing-footer p{
  margin:0;
  opacity:0.8;
}

.footer-links{
  display:flex;
  gap:20px;
}

.footer-links a{
  color:#fff;
  text-decoration:none;
  opacity:0.8;
  transition:opacity 0.2s;
}

.footer-links a:hover{
  opacity:1;
  text-decoration:underline;
}

/* Responsive */
@media (max-width:520px){
  .card img{height:140px}
  .auth-card{padding:30px 24px}
  .auth-header h1{font-size:24px}
  .profile-card{padding:30px 24px}
  .info-item{flex-direction:column;gap:4px}
  
  /* Landing Responsive */
  .landing-hero .landing-wrap{
    grid-template-columns:1fr;
    gap:40px;
    text-align:center;
  }
  
  .hero-title{
    font-size:32px;
  }
  
  .hero-subtitle{
    font-size:18px;
  }
  
  .hero-buttons{
    justify-content:center;
  }
  
  .btn{
    width:100%;
    text-align:center;
  }
  
  .landing-header .landing-wrap{
    flex-direction:column;
    gap:16px;
  }
  
  .landing-nav{
    width:100%;
    justify-content:center;
  }
  
  .nav-link{
    flex:1;
    text-align:center;
  }
  
  .features-title{
    font-size:28px;
  }
  
  .features-grid{
    grid-template-columns:1fr;
  }
  
  .cta-content h3{
    font-size:28px;
  }
  
  .cta-content p{
    font-size:18px;
  }
  
  .landing-footer .landing-wrap{
    flex-direction:column;
    text-align:center;
  }
  
  .footer-links{
    justify-content:center;
  }
}
