/* ===== Accent links (restore green text links) ===== */
:root{
  --accent: #21da84; /* 링크/포커스 등 공통 강조색 */
  --button-green-gradient: linear-gradient(180deg, #39d98a, #1ea86a);
  --button-green-shadow: 0 10px 22px rgba(16, 185, 129, 0.25);
  --accent-green: #21da84; /* (선택) 링크 전용으로 따로 쓰고 싶을 때 */
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", Arial;
}


.landing-foot a,
.trending-cta a,
.signup a,
.login-area .signup a,
.login-area .link,
.signup-card a{
  color: var(--accent-green);
  font-weight: 600;
  text-decoration: none;
}

.landing-foot a:hover,
.trending-cta a:hover,
.signup a:hover,
.login-area .signup a:hover,
.login-area .link:hover,
.signup-card a:hover{
  text-decoration: underline;
}



/* ===== Reset ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; background:var(--bg); }
body{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* ===== App Root ===== */
.root{
  width:100%;
  max-width:1200px;
  margin:40px auto 0;
  padding:0 24px;
}

/* ===== Shared Layout (Login/Signup views) ===== */
.login-screen{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:90px;
  padding:40px 0;
}

.big-logo{
  flex:0 0 auto;
  width:300px;
  height:300px;
}

.login-area{
  max-width:520px;
  text-align:center;
}

.logo-center{ margin-bottom:20px; }
.logo-center img{ width:160px; height:auto; opacity:0.95; }

.card{
  width:520px;
  background:var(--glass);
  padding:28px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid rgba(16,24,40,0.06);
}

.card .welcome{
  margin:0 0 24px;
  font-size:26px;
  font-weight:600;
  color:#333;
}

/* ===== Floating inputs ===== */
.input-box{
  position:relative;
  width:100%;
  margin-bottom:20px;
}

.input-box input{
  width:100%;
  padding:16px 14px;
  border:2px solid #ccc;
  border-radius:10px;
  background:transparent;
  font-size:16px;
  color:#000;
  outline:none;
  transition:0.25s ease;
}

.input-box label{
  position:absolute;
  top:50%;
  left:14px;
  transform:translateY(-50%);
  padding:0 6px;
  color:#777;
  background:#fff;
  pointer-events:none;
  transition:0.25s ease;
  font-size:16px;
}

.input-box input:focus{ border-color:var(--accent); }

.input-box input:focus + label,
.input-box input:not(:placeholder-shown) + label{
  top:-10px;
  left:10px;
  font-size:13px;
  color:var(--accent);
  transform:none;
}

/* ===== country dropdown ==== */
/* ===== Signup page: center the whole block ===== */
body.signup-page{
  justify-content: center;
}

.signup-main{
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 48px 24px 28px;
}

.signup-main .container{
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.signup-main h1,
.signup-main h2,
.signup-main p{
  text-align: center;
}

/* 카드 폭(지금 form-box가 조금 애매하게 보일 수 있어서 고정감 주기) */
.signup-main .form-box{
  width: 100%;
  max-width: 560px;
  margin: 18px auto 0;
}

/* ===== Phone row: same size select + input ===== */
.phone-row{
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 10px;
}

.phone-row .country-select{
  flex: 1;
  margin-bottom: 0; /* input-box 기본 margin-bottom 제거 */
}

.phone-row .phone-input{
  flex: 1;
  margin-bottom: 0;
}

/* 동일 높이 + 동일 테두리 느낌 */
.phone-row select,
.phone-row .phone-input input{
  height: 52px;
  border-radius: 10px;
}

/* select를 input이랑 최대한 동일하게 보이게 */
.phone-row select{
  width: 100%;
  padding: 0 14px;
  border: 2px solid #ccc;
  background: #fff;
  font-size: 16px;
  outline: none;
}

.phone-row select:focus{
  border-color: var(--accent);
}

/* phone input은 기존 floating input padding 때문에 높이 깨질 수 있어서 보정 */
.phone-row .phone-input input{
  padding: 0 14px;
}

/* floating label 위치도 높이 맞춰 보정 */
.phone-row .phone-input label{
  top: 50%;
  transform: translateY(-50%);
}

.phone-row .phone-input input:focus + label,
.phone-row .phone-input input:not(:placeholder-shown) + label{
  top: -10px;
  transform: none;
}

/* 모바일에서는 세로로 */
@media (max-width: 520px){
  .phone-row{
    flex-direction: column;
  }
}


/* ===== Buttons / links ===== */
.btn{
  width:100%;
  padding:12px;
  border:none;
  font-size:15px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}

.btn.green,
.btn.primary{
  background: var(--button-green-gradient);
  color: #fff;
  box-shadow: var(--button-green-shadow);
}


.btn.green:hover,
.btn.primary:hover{
  filter: brightness(1.03);
}

.btn.green:active,
.btn.primary:active{
  transform: translateY(1px);
  filter: brightness(0.98);
}


.btn.ghost{
  background:#fff;
  border:1px solid #ddd;
  color:#111;
}

.link, #forgot{
  display:block;
  margin-top:10px;
  color:var(--accent);
  text-decoration:none;
  font-size:14px;
}

.link:hover, #forgot:hover{ opacity:0.75; }

.signup{
  text-align:center;
  margin-top:12px;
  color:#555;
}

.signup a, .link-text a{
  color:var(--accent);
  font-weight:600;
  text-decoration:none;
}

.signup a:hover, .link-text a:hover{ opacity:0.75; }

/* a.btn이 button처럼 보이게 */
a.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
a.btn{ color: inherit; }
a.btn.green, a.btn.green:visited{ color:#fff; }  /* ✅ 초록 버튼 글씨 흰색 고정 */


/* ===== Signup: Birthday ===== */
.birthday-block{
  width:100%;
  margin-bottom:18px;
  text-align:left;
}

.birthday-label{
  font-size:14px;
  font-weight:600;
  color:#333;
}

.birthday-row{
  display:flex;
  gap:10px;
  margin-top:6px;
}

.birthday-row select{
  flex:1;
  padding:12px;
  border-radius:8px;
  border:1px solid #ccc;
  background:#fff;
  font-size:14px;
}

/* ===== Landing (Explore) 2-column ===== */
.landing .login-screen{ display:none; } /* 안전장치: 예전 레이아웃 숨김 */

.landing-grid{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:56px;
  align-items:center;
  padding:48px 0;
  min-height:calc(100vh - 140px);
}

.landing-left{ max-width:520px; }
.landing-logo img{ width:220px; height:auto; }

.landing-title{
  margin:18px 0 10px;
  font-size:44px;
  letter-spacing:-0.02em;
  color:#111;
}

.landing-desc{
  margin:0 0 22px;
  font-size:16px;
  line-height:1.5;
  color:#666;
}

.landing-actions{
  display:flex;
  gap:12px;
  margin-bottom:14px;
}

.landing-foot{
  margin:0;
  font-size:12px;
  color:#888;
  line-height:1.45;
}

.landing-foot a{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}

/* Right: trending card */
.trending-card{
  width:100%;
  max-width:560px;
  background:var(--glass);
  border:1px solid rgba(16,24,40,0.06);
  box-shadow:var(--shadow);
  border-radius:18px;
  padding:22px;
}

.trending-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.trending-head h2{
  margin:0;
  font-size:18px;
  color:#111;
}

.trending-sub{
  font-size:12px;
  color:#777;
}

.trending-list{
  display: flex;
  flex-direction: column;
  gap: 10px;          /* ✅ 간격은 여기서만 관리 */
}


.room-row{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #eee;
  background:rgba(255,255,255,0.85);
  cursor:pointer;
  text-align:left;
}

.room-row:hover{
  border-color:rgba(33,218,132,0.45);
  box-shadow:0 10px 30px rgba(16,24,40,0.06);
}

.room-main{ min-width:0; }
.room-title{
  font-weight:700;
  color:#111;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.room-tags{
  margin-top:4px;
  font-size:12px;
  color:#777;
}

.room-metric{
  font-size:13px;
  color:#666;
  white-space:nowrap;
}

/* room meta: handle + members (right side) */
.room-meta{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

.room-handle{
  font-size:12px;
  color:#888;
  font-weight:600;
}


.room-title-line{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.room-title{
  font-weight:700;
  color:#111;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.room-handle{
  font-size:12px;
  color:#999;
  font-weight:600;
  flex-shrink:0;
}

/* CTA inside card, centered */
.trending-cta{
  margin-top:14px;
  font-size:12px;
  color:#888;
  text-align:center;   /* ✅ 가운데 정렬 */
}


.trending-cta{
  margin-top:14px;
  font-size:12px;
  color:#888;
}

.trending-cta a{
  color:var(--accent);
  text-decoration:none;
  font-weight:700;
}

/* ===== Footer ===== */
.asterr-footer{
  width:100%;
  text-align:center;
  padding:30px 0 40px;
  color:#777;
  font-size:12px;
  margin-top:auto;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  margin-bottom:20px;
}

.footer-links a{
  color:#777;
  text-decoration:none;
  transition:color 0.2s;
}

.footer-links a:hover{ color:#000; }

.footer-bottom{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
}

.lang-select{
  padding:4px 6px;
  border:1px solid #ccc;
  border-radius:4px;
  font-size:12px;
  background:#fff;
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  .root{ padding:0 18px; }

  .login-screen{
    flex-direction:column;
    gap:32px;
  }

  .big-logo{
    width:auto;
    height:auto;
  }

  .card{
    width:100%;
    max-width:420px;
  }

  .landing-grid{
    grid-template-columns:1fr;
    gap:28px;
    padding:28px 0;
  }

  .trending-card{ max-width:520px; }
  .landing-title{ font-size:34px; }
}

/* ===== Auth pages: center (no left empty area) ===== */
.auth-center{
  justify-content: center;
  gap: 0;
}

.auth-center .big-logo{
  display:none;
}

.auth-center .login-area{
  max-width: 560px;
}

.auth-center .card{
  width: min(560px, 92vw);
}

/* ===== Password toggle icon ===== */
.password-box input{
  padding-right: 46px; /* 아이콘 공간 */
}

.password-toggle{
  position:absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}

.password-toggle:hover{
  border-color: rgba(33,218,132,0.45);
}

.password-toggle svg{
  width: 18px;
  height: 18px;
  color: #6b7280;
}

/* =========================
   Signup (enterprise-style)
========================= */

body.signup-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.signup-main{
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 56px 24px 28px;
}

.signup-main .container{
  width: 100%;
  max-width: 460px;
}

/* Card */
.signup-card{
  width: 100%;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

/* Header hierarchy */
.signup-head{
  text-align: center;
  margin-bottom: 18px;
}

.step-pill{
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #444;
  margin-bottom: 10px;
}

.signup-head .title{
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.4px;
}

.signup-head .subtitle{
  margin: 10px 0 0;
  font-size: 14px;
  color: #666;
}

/* Form spacing */
.signup-form{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== Step pages: spacing fix (margin + gap 중복 제거) ===== */
.signup-card .input-box{
  margin-bottom: 0; /* 전역 .input-box margin-bottom(20px) 무효화 */
}

.signup-form{
  gap: 10px; /* 14px → 10px (원하면 8~12 사이로 조절) */
}

.signup-card .birthday-block{
  margin-bottom: 10px; /* Birthday 아래도 과한 여백 줄이기 */
}

/* ===== Step2: 화면에서 살짝 아래로 내려 "중앙" 느낌 보정 ===== */
#stepAccount .signup-card{
  transform: translateY(18px);
}

/* (선택) Step1은 그대로 두고 싶으면 명시 */
#stepPhone .signup-card{
  transform: none;
}


/* Phone row: equal width */
.phone-row{
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.phone-row .country-select,
.phone-row .phone-input{
  flex: 1;
}

/* Inputs unified */
.signup-card .input-box{
  position: relative;
}

.signup-card input,
.signup-card select{
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 2px solid #d7d7d7;
  background: #fff;
  font-size: 16px;
  outline: none;
}

/* Select styling */
.signup-card select{
  padding: 0 14px;
  appearance: auto;
}

.signup-card select:focus{
  border-color: var(--accent);
}

/* Floating label fix (assumes your existing floating system) */
.signup-card .input-box input{
  padding: 0 14px;
}

.signup-card .input-box label{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #777;
  pointer-events: none;
  background: #fff;
  padding: 0 6px;
  transition: 0.15s ease;
}

.signup-card .input-box input:focus + label,
.signup-card .input-box input:not(:placeholder-shown) + label{
  top: -10px;
  transform: none;
  font-size: 12px;
  color: var(--accent);
}


/* Buttons */
.btn{
  height: 52px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary{
  margin-top: 2px;               /* “붙어 보이는” 느낌 제거 */
  background: var(--button-gradient, linear-gradient(180deg, #39d98a, #1ea86a));
  color: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.btn.primary:active{
  transform: translateY(1px);
}

.btn.ghost{
  background: #efefef;
  color: #111;
  box-shadow: none;
}

.btn.ghost:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

/* Helper + legal */
.helper{
  margin: -4px 0 0;
  font-size: 12.5px;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

.legal{
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #666;
  text-align: center;
  line-height: 1.5;
}

.legal a,
.alt a{
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.legal a:hover,
.alt a:hover{
  text-decoration: underline;
}

.alt{
  margin: 4px 0 0;
  text-align: center;
  font-size: 13px;
  color: #555;
}

/* ===== Fix: Signup Step2 spacing (override global input-box margin) ===== */
body.signup-page .signup-card .input-box{
  margin-bottom: 0;   /* 전역 .input-box margin-bottom(20px) 제거 */
}

body.signup-page .signup-form{
  gap: 12px;          /* 14px → 12px (원하면 10px까지) */
}

/* birthday 블록도 gap과 겹치니 margin 제거 */
body.signup-page .birthday-block{
  margin-bottom: 0;
}
body.signup-page .phone-row{ margin-top: 6px; }

/* ===== Signup layout: card dead-center + cleaner width ===== */
body.signup-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.signup-page .signup-main{
  flex: 1;
  display: flex;
  align-items: center;          /* ✅ 세로 중앙 */
  justify-content: center;      /* ✅ 가로 중앙 */
  padding: 56px 18px;           /* 화면 가장자리 여백 */
}

body.signup-page .container{
  width: 100%;
  max-width: 520px;             /* ✅ 카드 폭 살짝 넓혀서 안정감 */
}

body.signup-page .signup-card{
  width: 100%;
  padding: 28px 30px 22px;      /* ✅ 내부 여백 조금 더 균형 */
}

@media (max-width: 520px){
  body.signup-page .container{ max-width: 460px; }
  body.signup-page .signup-card{ padding: 24px 18px 18px; }
}

/* ✅ Step2만 살짝 아래로 */
#stepAccount{
  padding-top: 18px;
}

/* Step1은 그대로 */
#stepPhone{
  padding-top: 0;
}

body.signup-page.step2 .signup-card{
  transform: translateY(18px) !important;
}


/* Mobile */
@media (max-width: 520px){
  .signup-card{
    padding: 24px 18px 18px;
    border-radius: 16px;
  }
  .phone-row{
    flex-direction: column;
  }
}
