body {
  position: relative;
  margin: 0;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f5f5f5;
  color: #111;
  transition: background 0.3s, color 0.3s;
  padding: 20px;
  box-sizing: border-box;
}

body.dark {
  background: #0f172a;
  color: #f1f5f9;
}

.container, .content-container, .form-container {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: background 0.3s;
  text-align: center;
}

.container {
    max-width: 480px;
}

.content-container, .form-container {
    max-width: 800px;
    text-align: left;
}

body.dark .container, body.dark .content-container, body.dark .form-container {
  background: #1e293b;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 14px;
}

#themeBtn {
    position: absolute;
    top: 24px;
    right: 24px;
}

button {
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

button:hover {
  background: #1f2933;
}

.link-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: #111827;
  color: white;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
}

.link-button:hover {
  background: #1f2933;
}

body.dark button, body.dark .link-button {
  background: #334155;
  color: #f1f5f9;
}

body.dark button:hover, body.dark .link-button:hover {
    background: #475569;
}

.main-btn {
  width: 100%;
  font-size: 16px;
  margin-bottom: 20px;
  padding: 14px;
}

#numbersContainer {
    margin-top: 24px;
}

.set {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.label {
  width: 50px;
  font-weight: bold;
}

.number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #111;
}

body.dark .number {
  background: #475569;
  color: #f1f5f9;
}

.bonus {
  background: #fbbf24;
  color: #000;
}

body.dark .bonus {
  background: #f59e0b;
}

.content-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  text-align: left;
}

body.dark .content-section {
  border-top-color: #334155;
}

.content-section h2, .content-container h2, .form-container h2 {
  margin-bottom: 12px;
}

.content-section p, .content-container p, .content-container li, .form-container label {
  line-height: 1.6;
}

.content-section a {
    color: #007bff;
    text-decoration: none;
}

/* Style for links that are direct children of .content-section, like in the blog section */
.content-section > a {
    display: block;
    margin-bottom: 12px;
}

.content-section > a:last-of-type {
    margin-bottom: 0;
}


/* Force inline display for links inside the list specifically on other pages */
.content-section ul li a {
    display: inline !important;
}

/* About Us - Author profile spacing */
.author-profile p:first-of-type {
    margin-bottom: 0;
}

.author-profile p:nth-of-type(2) {
    margin-top: 4px;
}

.site-footer {
  margin-top: 32px;
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
  width: 100%;
}

body.dark .site-footer {
  color: #94a3b8;
}

.site-footer nav {
  margin-top: 10px;
}

.site-footer a {
  color: #111827;
  text-decoration: none;
  margin: 0 8px;
}

body.dark .site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Form specific styles */
.form-group {
  margin-bottom: 15px;
}

.form-container label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box; 
  font-size: 16px;
}

body.dark input[type="text"],
body.dark input[type="email"],
body.dark textarea {
    background-color: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

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

.form-container button[type="submit"] {
  background-color: #007bff;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  width: 100%;
}

.form-container button[type="submit"]:hover {
  background-color: #0056b3;
}

/* Blog page */
.post-list {
    margin-top: 20px;
}

.post-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: left;
}

body.dark .post-item {
    background: #334155;
    border-color: #475569;
}

.post-item a {
    font-size: 20px;
    color: #007bff;
    text-decoration: none;
  font-weight: bold;
  display: inline-block; /* Prevent line break issues */
  margin-bottom: 0;
}

.post-item p {
    margin-top: 8px;
}

.article-container a {
  color: #007bff;
}

.article-container a:hover {
  text-decoration: underline;
}

body.dark .content-section a,
body.dark .post-item a,
body.dark .article-container a,
body.dark .content-section a:visited,
body.dark .post-item a:visited,
body.dark .article-container a:visited {
    color: #87CEEB;
}

/* Stats page */
#stats-container {
    width: 100%;
    max-width: 800px;
}

.code-block {
    background: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-family: monospace;
    white-space: pre-wrap;
}

body.dark .code-block {
    background: #475569;
}
