:root {
    --bg-color: #0f1116;
    --card-bg: #1a1d24;
    --gold-primary: #d4af37;
    --gold-gradient: linear-gradient(135deg, #f9d976 0%, #d4af37 100%);
    --text-gray: #8a8d91;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    overflow: auto;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    padding: 40px 20px 80px 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Header */
.welcome-header {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-header h1 {
    font-size: 2rem;
    color: #f9d976;
    margin: 0;
}

.welcome-header h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 5px 0;
}

.welcome-header p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Login Card */
.login-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #2d3139;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--gold-primary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.input-wrapper {
    background: #252932;
    border: 1px solid #444;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
}

.input-wrapper i {
    color: var(--gold-primary);
    margin-right: 10px;
}

.input-wrapper input {
    background: none;
    border: none;
    color: white;
    outline: none;
    width: 100%;
}

.forgot-link {
    display: block;
    text-align: right;
    color: var(--gold-primary);
    font-size: 0.8rem;
    text-decoration: none;
    margin-bottom: 20px;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: none;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* Signup Section */
.signup-section {
    background: var(--card-bg);
    margin-top: 20px;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
}

.signup-section h3 { margin: 0; font-size: 1.1rem; }
.signup-section p { color: var(--text-gray); font-size: 0.8rem; margin: 8px 0 20px; }

.btn-signup {
    width: 100%;
    padding: 15px;
    background: var(--gold-gradient);
    border: none;
    border-radius: 10px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    margin-bottom: 10px;
}

.create-link {
    color: var(--gold-primary);
    font-size: 0.8rem;
    text-decoration: underline;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: #111;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid #222;
}

.nav-item { color: #555; text-align: center; font-size: 1.2rem; }
.nav-item.active { color: var(--gold-primary); }
.nav-item span { display: block; font-size: 0.6rem; }

/* 로고 전체 컨테이너 */
.logo-area {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

/* 금색 테두리 바깥 원 */
.logo-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #f9d976, #b28e28, #f9d976);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 
                inset 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 5px; /* 테두리 두께 조절 */
    position: relative;
    animation: shine 3s infinite linear;
}

/* 내부 원형 영역 */
.logo-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #2a2d34 0%, #0f1116 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
}

/* 임시 로고 텍스트 스타일 */
.logo-placeholder {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(to bottom, #f9d976, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* 로고 반짝임 애니메이션 */
@keyframes shine {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
    100% { filter: brightness(1); }
}

.top-nav-bar {
    display: flex;
    align-items: center;
    padding: 10px 0;
    position: relative;
}

.btn-back {
    background: none;
    border: none;
    color: var(--gold-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
}

.nav-title {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    color: white;
}

/* 이메일 + 버튼 나란히 배치 */
.input-row {
    display: flex;
    gap: 10px;
}

.flex-3 { flex: 3; }

.btn-verify {
    flex: 1;
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-verify:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* 타이머 스타일 */
.timer {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: bold;
}

/* 약관 동의 */
.terms-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 0.8rem;
    color: var(--text-gray);
}

.terms-check input[type="checkbox"] {
    accent-color: var(--gold-primary);
    width: 16px;
    height: 16px;
}

.terms-check span {
    color: var(--gold-primary);
    text-decoration: underline;
}

/* 메인 가입 버튼 (골드 그라데이션) */
.btn-signup-full {
    width: 100%;
    padding: 16px;
    background: var(--gold-gradient);
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1rem;
    color: #000;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.footer-text {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.footer-text a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: bold;
}

/*============================================================*/

/* 대시보드 전용 추가 스타일 */

.dashboard-body {
    background: #0f1116;
    overflow-y: auto; /* 대시보드는 스크롤 가능하게 */
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 45px;
    height: 45px;
    background: var(--gold-gradient);
    border-radius: 50%;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
}

.welcome-msg { font-size: 0.8rem; color: var(--text-gray); margin: 0; }
.status-msg { font-size: 0.75rem; color: #fff; margin: 0; display: flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; background: #4caf50; border-radius: 50%; }

.btn-icon { background: #1a1d24; border: 1px solid #333; color: white; padding: 10px; border-radius: 12px; }

/* 자산 카드 */
.total-balance-card {
    background: linear-gradient(145deg, #1e222a, #111318);
    padding: 30px 20px;
    border-radius: 25px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    text-align: center;
    margin-bottom: 25px;
}

.total-balance-card .label { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 10px; }
.total-balance-card .balance-amount { font-size: 2.2rem; margin: 0; color: #fff; }
.total-balance-card small { font-size: 1rem; color: var(--gold-primary); }

.balance-stats { margin-top: 15px; font-size: 0.85rem; }
.trend.up { color: #4caf50; margin-right: 15px; }

/* 액션 버튼 그리드 */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.action-btn {
    background: none;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #1a1d24;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--gold-primary);
    transition: 0.3s;
}

.action-btn.highlight .icon-box {
    background: var(--gold-gradient);
    color: #000;
}

.action-btn span { font-size: 0.75rem; color: var(--text-gray); }

/* 섹션 타이틀 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.section-title h3 { font-size: 1.1rem; margin: 0; }
.section-title a { color: var(--gold-primary); font-size: 0.8rem; text-decoration: none; }

/* 스테이킹 & 자산 아이템 */
.staking-card, .asset-item {
    background: #1a1d24;
    padding: 18px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.staking-info p { margin: 0 0 5px; font-size: 0.8rem; color: var(--text-gray); }
.gold-text { color: var(--gold-primary); }

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}
.btc { background: rgba(247, 147, 26, 0.1); color: #f7931a; }
.aiq { background: rgba(212, 175, 55, 0.1); color: var(--gold-primary); }

.asset-name { flex: 1; margin-left: 15px; }
.asset-name strong { display: block; font-size: 1rem; }
.asset-name span { font-size: 0.75rem; color: var(--text-gray); }

.asset-value { text-align: right; }
.asset-value strong { display: block; font-size: 1rem; }
.asset-value span { font-size: 0.75rem; color: #4caf50; }

/* 스크롤바 숨기기 (선택사항) */
.dashboard-body::-webkit-scrollbar { display: none; }

/*========================================================*/

/* 프로필 카드 스타일 */
.profile-card {
    text-align: center;
    padding: 20px 0 30px;
}

.avatar-large {
    width: 90px;
    height: 90px;
    background: var(--gold-gradient);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 900;
    color: #000;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.profile-card h3 { margin: 0; font-size: 1.3rem; }
.profile-card p { color: var(--text-gray); font-size: 0.85rem; margin: 5px 0 15px; }

.btn-edit-profile {
    background: #1a1d24;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* 설정 그룹 */
.settings-group {
    margin-bottom: 25px;
}

.group-title {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
    padding-left: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-list {
    background: #1a1d24;
    border-radius: 18px;
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #252932;
    cursor: pointer;
    transition: 0.2s;
}

.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: #252932; }

.item-icon {
    width: 35px;
    color: var(--gold-primary);
    font-size: 1.1rem;
}

.item-label {
    flex: 1;
    font-size: 0.95rem;
}

.arrow {
    color: #444;
    font-size: 0.8rem;
}

.status-text.active {
    color: var(--gold-primary);
    font-size: 0.85rem;
    font-weight: bold;
}

.logout { color: #ff4d4d; }
.logout .item-icon { color: #ff4d4d; }

/* 토글 스위치 디자인 */
.toggle-switch {
    position: relative;
}

.toggle-switch input { display: none; }

.toggle-switch label {
    display: block;
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-switch label::after {
    content: "";
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch input:checked + label {
    background: var(--gold-primary);
}

.toggle-switch input:checked + label::after {
    left: 22px;
}

/*====================================================*/

/* History 필터 버튼 */
.history-filter {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    overflow-x: auto;
    padding-bottom: 5px;
}

.history-filter::-webkit-scrollbar { display: none; }

.filter-btn {
    white-space: nowrap;
    padding: 8px 20px;
    background: #1a1d24;
    border: 1px solid #333;
    border-radius: 20px;
    color: var(--text-gray);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active {
    background: var(--gold-primary);
    color: #000;
    border-color: var(--gold-primary);
    font-weight: bold;
}

/* 날짜 구분선 */
.date-divider {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin: 20px 0 10px 5px;
}

/* 히스토리 아이템 */
.history-list {
    padding-bottom: 80px; /* 하단 내비 여백 */
}

.history-item {
    background: #1a1d24;
    padding: 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.history-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}

/* 아이콘 타입별 색상 */
.history-icon.deposit { background: rgba(76, 175, 80, 0.1); color: #4caf50; }
.history-icon.withdraw { background: rgba(244, 67, 54, 0.1); color: #f44336; }
.history-icon.staking { background: rgba(212, 175, 55, 0.1); color: var(--gold-primary); }
.history-icon.swap { background: rgba(33, 150, 243, 0.1); color: #2196f3; }

.history-info {
    flex: 1;
    margin-left: 15px;
}

.history-info strong { display: block; font-size: 0.95rem; margin-bottom: 3px; }
.history-info span { font-size: 0.75rem; color: var(--text-gray); }

.history-amount { text-align: right; }
.history-amount strong { display: block; font-size: 0.95rem; }
.history-amount span { font-size: 0.75rem; color: var(--text-gray); }

/* 금액 색상 */
.positive strong { color: #4caf50; }
.negative strong { color: #f44336; }

/*========================================*/

/* Staking 전용 */
.staking-hero-card {
    background: var(--gold-gradient);
    padding: 30px 20px;
    border-radius: 25px;
    color: #000;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}
.staking-hero-card p { margin: 0; font-size: 0.9rem; font-weight: 500; }
.staking-hero-card h2 { margin: 10px 0; font-size: 2.2rem; }
.apy-badge {
    display: inline-block;
    background: #000;
    color: var(--gold-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.period-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.period-btn {
    background: #1a1d24;
    border: 1px solid #333;
    color: white;
    padding: 12px 0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
}
.period-btn.active {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.1);
}

.btn-max {
    background: none;
    border: none;
    color: var(--gold-primary);
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
}

.balance-helper { font-size: 0.75rem; color: var(--text-gray); margin-top: 8px; text-align: right; }

/* Withdraw 전용 */
.asset-selector-card {
    background: #1a1d24;
    padding: 15px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}
.asset-select-info { flex: 1; }
.asset-select-info strong { display: block; font-size: 1rem; }
.asset-select-info span { color: var(--text-gray); font-size: 0.8rem; }

.withdraw-summary-card {
    background: #13151a;
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}
.summary-row.total { color: white; font-size: 1rem; margin-top: 10px; }
.divider { border: 0; border-top: 1px solid #222; margin: 10px 0; }

.btn-danger-gradient {
    background: linear-gradient(135deg, #ff4d4d, #b30000);
    color: white;
}

/*==========================================*/

/* 비밀번호 찾기 아이콘 데코레이션 */
.icon-circle-large {
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--gold-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* 입력창 내 타이머 강조 */
.timer {
    color: #ff4d4d;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 40px;
}

/* 입력 wrapper 내 아이콘 강조 */
.input-wrapper i.gold-text {
    color: var(--gold-primary);
}

/* 성공/안내 텍스트가 필요할 경우 */
.helper-text {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 5px;
    padding-left: 5px;
}
