/* UI Style 6 - Layout G */
:root {
  --primary-color: #1a73e8;
  --secondary-color: #34a853;
  --accent-color: #ea4335;
  --bg-color: #ffffff;
  --text-color: #202124;
  --border-color: #dadce0;
  --hover-bg: #f1f3f4;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

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

/* Header */
header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  flex: 1;
  justify-content: flex-end;
  overflow: hidden;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 15px;
}

nav a:hover {
  background: var(--hover-bg);
  color: var(--primary-color);
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-color);
  line-height: 1.3;
}

h2 {
  font-size: 26px;
  margin: 30px 0 20px;
  color: var(--text-color);
}

h3 {
  font-size: 20px;
  margin: 20px 0 15px;
  color: var(--text-color);
}

section {
  margin-bottom: 50px;
}

.intro {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.intro h1 {
  color: white;
  margin-bottom: 20px;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s;
  cursor: pointer;
}

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

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #5f6368;
}

.card-meta span {
  background: var(--hover-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-desc {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.card-link:hover {
  text-decoration: underline;
}

/* List View */
.list-view {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.list-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--hover-bg);
}

.list-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.list-title a {
  color: var(--text-color);
  text-decoration: none;
}

.list-title a:hover {
  color: var(--primary-color);
}

/* Detail Page */
.detail-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.detail-header h1 {
  color: white;
  margin-bottom: 20px;
}

.detail-info {
  background: white;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.info-item {
  padding: 10px;
  background: var(--hover-bg);
  border-radius: 6px;
}

.info-label {
  font-weight: 600;
  color: #5f6368;
  font-size: 13px;
  margin-bottom: 4px;
}

.info-value {
  font-size: 15px;
  color: var(--text-color);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
}

.content-section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.content-section h2 {
  margin-top: 0;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.content-section p {
  line-height: 1.8;
  margin-bottom: 15px;
  color: #3c4043;
}

/* Footer */
footer {
  background: #f8f9fa;
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
  color: #5f6368;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    padding: 12px 15px;
  }
  
  .logo {
    font-size: 20px;
    flex-shrink: 0;
    margin-right: 10px;
  }
  
  nav {
    flex: 1 1 0;
    min-width: 0;
    justify-content: space-between;
    gap: 2px;
  }
  
  nav a {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 4px;
    font-size: 13px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .intro {
    padding: 25px;
  }
  
  .detail-header {
    padding: 25px;
  }
  
  .detail-info {
    padding: 20px;
  }
  
  .content-section {
    padding: 20px;
  }
  
  main {
    padding: 20px 0;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 18px;
  }
  
  nav a {
    font-size: 11px;
    padding: 5px 2px;
  }
}
