/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Color Variables inspired by visitvinoth.com */
:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #1e40af;
  --dark-blue: #1e293b;
  --accent-orange: #f59e0b;
  --accent-yellow: #fbbf24;
  --light-gray: #f8fafc;
  --medium-gray: #64748b;
  --dark-gray: #334155;
  --white: #ffffff;
  --text-light: #e2e8f0;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Layout */
body {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background: rgba(30, 58, 138, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header h1 {
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

header nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

header nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: var(--accent-yellow);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Main Content */
main {
  padding: 3rem 0;
  flex: 1;
}

.content-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--dark-gray);
  line-height: 1.7;
}

/* Form Styles */
form {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: none;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.btn-accent {
  background: var(--accent-orange);
  color: var(--white);
}

.btn-accent:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.btn-google {
  background: #4285f4;
  color: var(--white);
  width: 100%;
  margin-top: 1rem;
}

.btn-google:hover {
  background: #3367d6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

input[type="submit"] {
  width: 100%;
  margin-top: 1rem;
}

/* Post Styles */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.post-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.post-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-body {
  color: var(--dark-gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--medium-gray);
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Links */
a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-blue);
  text-decoration: underline;
}

.link-accent {
  color: var(--accent-orange);
  font-weight: 600;
}

.link-accent:hover {
  color: #d97706;
}

/* Flash Messages */
.flash {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-weight: 500;
}

.flash.notice {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.flash.error,
.flash.alert {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--medium-gray);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  header nav {
    gap: 1rem;
  }
  
  .content-card {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
