/* 
 * Ohio State Football News Website Styles
 * Color scheme: Scarlet (#bb0000), Gray (#555555), White (#ffffff)
 * Modify colors, layout, or fonts by editing these CSS rules
 */

/* Base styles */
:root {
  --osu-scarlet: #bb0000;
  --osu-gray: #555555;
  --osu-white: #ffffff;
  --text-primary: #222;
  --text-secondary: #5f6368;
  --text-meta: #70757a;
  --background: #f6f6f8;
  --card-background: #fff;
  --border-color: #eee;
  --shadow: rgba(0,0,0,0.1);
  --hover-shadow: rgba(0,0,0,0.15);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Header styling - change colors or layout here */
header {
  background: var(--osu-scarlet); /* Ohio State scarlet */
  color: var(--osu-white);
  padding: 1.5em 1em;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
}

header h1 {
  margin: 0;
  font-size: 2.2em;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

header p {
  margin: 0.5em 0 1em;
  font-size: 1.1em;
  opacity: 0.9;
}

/* Navigation styling */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}

.main-nav button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.main-nav button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Main content layout */
main {
  max-width: 900px;
  margin: 2em auto;
  padding: 0 1.5em;
}

/* News container styling */
#news-container {
  background: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
  padding: 1.5em;
  margin-bottom: 2em;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 1.5em;
}

.news-header h2 {
  margin: 0;
  color: var(--osu-scarlet);
}

.news-filters {
  display: flex;
  gap: 1em;
  align-items: center;
}

.news-filters select {
  padding: 0.5em;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: white;
}

/* News item styling - modify appearance of each story (Google News style) */
.story {
  background: var(--card-background);
  margin-bottom: 1.8em;
  padding: 1.2em;
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow);
  border-left: 3px solid var(--osu-scarlet); /* Scarlet accent */
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.story:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--hover-shadow);
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5em;
}

.headline {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 0.5em;
  flex: 1;
}

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

.headline a:hover {
  color: var(--osu-scarlet);
  text-decoration: underline;
}

.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 1.2em;
  padding: 0 0.2em;
}

.bookmark-btn:hover {
  color: var(--osu-scarlet);
}

.bookmark-btn .fa-bookmark {
  color: var(--osu-scarlet);
}

.bookmark-empty {
  color: #ccc !important;
}

/* Summary text styling (Google News style) */
.summary {
  margin: 0.5em 0 0.8em 0;
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.95em;
}

/* Metadata styling (source, date) */
.meta {
  color: var(--text-meta);
  font-size: 0.85em;
  margin-top: 0.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5em;
  border-top: 1px solid #f1f3f4;
}

/* Controls section */
#controls {
  max-width: 900px;
  margin: 0 auto 2em;
  padding: 0 1.5em;
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: stretch;
}

.search-container {
  display: flex;
  gap: 0.5em;
}

#search-input {
  flex: 1;
  padding: 0.8em;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1em;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

#search-btn {
  background: var(--osu-scarlet);
  color: white;
  border: none;
  padding: 0.8em 1.2em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}

#search-btn:hover {
  background: #990000;
}

.sort-container {
  display: flex;
  gap: 0.5em;
}

#sort-select, #source-filter, #date-filter {
  padding: 0.8em;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: white;
  font-size: 1em;
}

#sort-btn {
  background: var(--osu-scarlet);
  color: white;
  border: none;
  padding: 0.8em 1.2em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s;
}

#sort-btn:hover {
  background: #990000;
}

.view-options {
  display: flex;
  gap: 1em;
  align-items: center;
  justify-content: center;
}

.view-options label {
  display: flex;
  align-items: center;
  gap: 0.3em;
  cursor: pointer;
}

/* Loading indicator */
#news-loading {
  text-align: center;
  padding: 2em;
  color: #777;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: var(--card-background);
  margin: 5% auto;
  padding: 2em;
  border: none;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: var(--osu-scarlet);
}

.settings-options {
  margin-top: 1.5em;
}

.setting-item {
  margin-bottom: 1.5em;
}

.setting-item label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
}

.bookmark-item {
  padding: 1em;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1em;
}

.bookmark-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.bookmark-headline a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.bookmark-headline a:hover {
  color: var(--osu-scarlet);
  text-decoration: underline;
}

.bookmark-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5em;
  font-size: 0.9em;
  color: var(--text-meta);
}

.remove-bookmark-btn {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 1.2em;
}

.remove-bookmark-btn:hover {
  color: #ff0000;
}

/* Dark theme */
.theme-dark {
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-meta: #909090;
  --background: #121212;
  --card-background: #1e1e1e;
  --border-color: #444;
  --shadow: rgba(0,0,0,0.3);
  --hover-shadow: rgba(0,0,0,0.5);
}

.theme-dark header {
  background: #900000;
}

.theme-dark .modal-content {
  background-color: #2e2e2e;
  color: #e0e0e0;
}

/* Responsive design */
@media (max-width: 768px) {
  main, #controls {
    padding: 0 1em;
  }
  
  .news-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .news-filters {
    width: 100%;
  }
  
  .main-nav {
    flex-direction: column;
  }
  
  header h1 {
    font-size: 1.8em;
    flex-direction: column;
  }
  
  .headline {
    font-size: 1.1em;
  }
  
  #controls {
    padding: 0 1em;
  }
  
  .search-container,
  .sort-container {
    flex-direction: column;
  }
  
  .view-options {
    flex-wrap: wrap;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}