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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* ==================== 상단 네비게이션 ==================== */

.top-nav {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-link {
  padding: 10px 20px;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
  font-weight: 500;
}

/* ==================== 유리 효과 버튼 ==================== */

.glass-btn {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.glass-btn:hover {
  background: linear-gradient(135deg, rgba(135, 206, 250, 0.5), rgba(100, 149, 237, 0.5));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.glass-btn:active {
  transform: translateY(0);
}

.glass-btn.small {
  padding: 8px 16px;
  font-size: 13px;
}

.glass-btn.primary {
  background: linear-gradient(135deg, rgba(100, 149, 237, 0.6), rgba(72, 118, 255, 0.6));
}

.glass-btn.secondary {
  background: rgba(150, 150, 150, 0.3);
}

/* ==================== 유리 효과 카드 ==================== */

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

/* ==================== 메인 레이아웃 (index.html) ==================== */

.main-container {
  max-width: 1600px;
  margin: 30px auto;
  padding: 0 30px;
  display: flex;
  gap: 30px;
}

.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-panel {
  width: 850px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 검색 섹션 */
.search-section h3 {
  color: white;
  margin-bottom: 15px;
  font-size: 18px;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 14px;
  backdrop-filter: blur(5px);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
}

/* 피드 섹션 */
.feed-section {
  flex: 1;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.feed-header h3 {
  color: white;
  font-size: 18px;
}

.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 10px;
}

.posts-feed::-webkit-scrollbar {
  width: 6px;
}

.posts-feed::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.posts-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.post-item {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.post-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.post-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.post-author {
  color: white;
  font-weight: 600;
  font-size: 13px;
}

.post-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.post-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.post-preview {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.5;
}

/* 차트 영역 */
.chart-search {
  display: flex;
  gap: 10px;
  padding: 15px;
}

.chart-search input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 14px;
  backdrop-filter: blur(5px);
}

.chart-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.chart-search input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.chart-container {
  width: 100%;
  height: 600px;
  padding: 0;
  overflow: hidden;
}

#tradingview_chart {
  width: 100%;
  height: 100%;
}

/* ==================== 포럼 페이지 ==================== */

.forum-search {
  max-width: 1600px;
  margin: 20px auto;
  padding: 0 30px;
}

.search-box-large {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-box-large input {
  flex: 1;
  padding: 15px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  backdrop-filter: blur(5px);
}

.search-box-large input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box-large input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
}

.forum-container {
  max-width: 1600px;
  margin: 0 auto 50px;
  padding: 0 30px;
}

.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.forum-header h2 {
  color: white;
  font-size: 28px;
}

/* 게시글 그리드 (디스코드 포럼 스타일) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.forum-card {
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.forum-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.forum-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.forum-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.author-icon {
  font-size: 16px;
}

.forum-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.forum-card-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.forum-card-preview {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.forum-card-footer {
  display: flex;
  gap: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.forum-stat {
  color: white;
  font-size: 13px;
  font-weight: 500;
}

/* ==================== 게시글 상세 ==================== */

.back-btn {
  margin-bottom: 20px;
}

.detail-card {
  padding: 30px;
  margin-bottom: 20px;
}

.detail-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.detail-header h1 {
  color: white;
  font-size: 32px;
  margin-bottom: 15px;
}

.detail-meta {
  display: flex;
  gap: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.detail-content {
  color: white;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 30px;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

/* 댓글 섹션 */
.comments-section {
  padding: 30px;
}

.comments-section h3 {
  color: white;
  font-size: 22px;
  margin-bottom: 20px;
}

.comment-write {
  margin-bottom: 30px;
}

.comment-write textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  backdrop-filter: blur(5px);
  margin-bottom: 10px;
}

.comment-write textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.comment-write textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.comment-item {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-author {
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.comment-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.comment-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.6;
}

/* ==================== 글쓰기 페이지 ==================== */

.write-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 30px;
}

.write-card {
  padding: 40px;
}

.write-card h2 {
  color: white;
  font-size: 28px;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  color: white;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 15px;
  font-family: inherit;
  backdrop-filter: blur(5px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
}

.form-group textarea {
  resize: vertical;
  min-height: 300px;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
}

/* ==================== 공통 ==================== */

.loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  padding: 40px;
  font-size: 14px;
}

.no-posts,
.no-comments {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 40px;
  font-size: 15px;
}

.error {
  text-align: center;
  color: #ff6b6b;
  padding: 40px;
  font-size: 14px;
}

/* ==================== 로그인/회원가입 페이지 ==================== */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 50px 40px;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo h1 {
  color: white;
  font-size: 36px;
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.auth-logo p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.auth-btn {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(100, 149, 237, 0.6), rgba(72, 118, 255, 0.6));
}

.auth-btn:hover {
  background: linear-gradient(135deg, rgba(135, 206, 250, 0.7), rgba(100, 149, 237, 0.7));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.auth-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-footer p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 10px;
}

.auth-link {
  color: white;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-block;
}

.auth-link:hover {
  color: rgba(135, 206, 250, 1);
  transform: translateX(5px);
}

/* ==================== 반응형 ==================== */

@media (max-width: 1400px) {
  .right-panel {
    width: 700px;
  }
}

@media (max-width: 1200px) {
  .main-container {
    flex-direction: column;
  }
  
  .right-panel {
    width: 100%;
  }
  
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 15px 20px;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    margin-top: 15px;
    justify-content: center;
  }
  
  .main-container,
  .forum-container,
  .write-container {
    padding: 0 15px;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 400px;
  }
}
