/* Electronic Specification - Phone Specs Website */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --bg: #f8f9fa;
  --card-bg: #fff;
  --text: #202124;
  --text-muted: #5f6368;
  --border: #dadce0;
  --success: #34a853;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo span { color: var(--text); }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Phone Grid */
.phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.phone-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.phone-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 1.5rem;
}

.phone-card .brand {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.phone-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.phone-card .specs-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.phone-card .specs-preview span {
  display: inline-block;
  margin-right: 1rem;
}

/* Phone Detail Page */
.phone-detail {
  padding: 2rem 0;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.phone-header {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.phone-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.phone-header .release {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.specs-section {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.specs-section h2 {
  background: var(--bg);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child { border-bottom: none; }

.specs-table th,
.specs-table td {
  padding: 0.875rem 1.5rem;
  text-align: left;
  font-size: 0.9rem;
}

.specs-table th {
  width: 35%;
  color: var(--text-muted);
  font-weight: 500;
  background: #fafafa;
}

.specs-table td { color: var(--text); }

/* Key Specs Highlight */
.key-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.key-spec {
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
}

.key-spec .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.key-spec .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Footer */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

/* Brand filter */
.brand-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.brand-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.brand-btn:hover,
.brand-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.5rem; }
  .phone-header h1 { font-size: 1.5rem; }
  .specs-table th,
  .specs-table td { padding: 0.75rem 1rem; }
  .specs-table th { width: 40%; }
  nav ul { gap: 1rem; }
}

@media (max-width: 480px) {
  .specs-table th { width: 45%; font-size: 0.8rem; }
  .specs-table td { font-size: 0.85rem; }
  .key-specs { grid-template-columns: repeat(2, 1fr); }
}
