@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Header 样式 */
header {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background-color 0.3s ease;
}

header .container {
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 2rem;
}

header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Logo 样式 */
.logo {
    font-size: 1.9rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    flex: 0 0 auto;
    font-family: 'Playfair Display', serif;
}

/* 导航菜单样式 */
nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    justify-content: center;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 620;
    font-size: 1.02rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav a:hover, nav a.active {
    color: #00c805;
    background-color: rgba(0, 200, 5, 0.2);
}

/* 登录按钮样式 */
.auth-buttons {
    display: flex;
    gap: 1rem;
    flex: 0 0 auto;
    margin-left: 1rem;
}

.auth-buttons .auth-button {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-buttons .login {
    background: transparent;
    border: 1px solid #00c805;
    color: #00c805;
}

.auth-buttons .signup {
    background: #00c805;
    border: 1px solid #00c805;
    color: white;
}

.auth-buttons .login:hover {
    background: #00c805;
    color: white;
}

.auth-buttons .signup:hover {
    background: transparent;
    color: #00c805;
}

.auth-buttons .auth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

main {
    padding: 6rem 2rem 4rem;
    min-height: calc(100vh - 200px);
}

/* Footer 样式 */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 3rem 2rem;
    position: relative;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h3 {
    color: #00c805;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 其他footer相关样式 */

/* 汉堡菜单按钮样式优化 */
.menu-button {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    margin-left: auto;
}

.menu-button span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-button {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        padding: 80px 1.5rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        right: 0;
    }

    /* 移动端导航菜单容器优化 */
    .mobile-nav-container {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-color);
        padding: 80px 1.5rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .mobile-nav-container.active {
        right: 0;
    }

    /* 关闭按钮样式 */
    .mobile-close-button {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: transparent;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .mobile-close-button::before,
    .mobile-close-button::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: var(--text-color);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile-close-button::before {
        transform: rotate(45deg);
    }

    .mobile-close-button::after {
        transform: rotate(-45deg);
    }

    .mobile-close-button:hover {
        background: rgba(128, 128, 128, 0.1);
    }

    /* 移动端认证按钮容器优化 */
    .mobile-auth-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-auth-container .auth-button {
        padding: 0.8rem 1.5rem;
        border-radius: 12px;
        font-weight: 500;
        text-align: center;
        transition: all 0.3s ease;
        text-decoration: none;
        font-size: 0.95rem;
    }

    .mobile-auth-container .login {
        background: transparent;
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
    }

    .mobile-auth-container .signup {
        background: var(--primary-color);
        border: 1px solid var(--primary-color);
        color: white;
    }

    .mobile-auth-container .auth-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* 移动端主题切换容器优化 */
    .mobile-theme-container {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    #mobile-theme-toggle {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: transparent;
        border: 1px solid var(--border-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    #mobile-theme-toggle:hover {
        background: rgba(128, 128, 128, 0.1);
        transform: scale(1.05);
    }

    #mobile-theme-toggle svg {
        width: 24px;
        height: 24px;
        color: var(--text-color);
    }

    /* 移动端导航链接容器优化 */
    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-nav-links a {
        display: flex;
        padding: 0.7rem 1.2rem;
        width: 100%;
        text-align: center;
        justify-content: center;
        border-radius: 10px;
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        background: transparent;
        border: 1px solid transparent;
    }

    .mobile-nav-links a:hover {
        background: rgba(128, 128, 128, 0.1);
        transform: translateY(-1px);
    }

    .mobile-nav-links a.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    /* 暗色模式适配 */
    [data-theme="dark"] .mobile-nav-container {
        background: var(--header-bg);
    }

    [data-theme="dark"] .mobile-auth-container,
    [data-theme="dark"] .mobile-theme-container {
        border-bottom-color: var(--border-color);
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav ul li {
        width: 100%;
    }

    nav a {
        display: flex;
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: center;
        justify-content: center;
        border-radius: 12px;
    }

    .auth-buttons {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        padding: 1rem 1.5rem;
        background: white;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 0.8rem;
    }

    nav.active + .auth-buttons {
        right: 0;
    }

    .auth-buttons a {
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .auth-buttons::before {
        content: '';
        display: block;
        height: 1px;
        background: #eee;
        margin: 0.5rem 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h4 {
        margin-top: 1.5rem;
    }

    .theme-switch {
        margin: 0;
        width: 100%;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #eee;
    }

    #theme-toggle {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
        border-radius: 12px;
    }

    [data-theme="dark"] .theme-switch {
        border-bottom-color: var(--border-color);
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    nav, .auth-buttons {
        width: 100%;
    }

    .auth-buttons a {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }
}

/* 在文件末尾添加 */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
}

.error-container h1 {
    font-size: 6rem;
    color: #00c805;
    margin-bottom: 1rem;
}

.error-container p {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
}

.back-home {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #00c805;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 200, 5, 0.2);
}

/* 主题切换按钮样式 */
.theme-switch {
    margin-right: 1rem;
}

#theme-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

#theme-toggle svg {
    width: 20px;
    height: 20px;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

/* 暗色模式样式 */
[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --header-bg: rgba(26, 26, 26, 0.98);
    --card-bg: #000000;
    --border-color: #000000;
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] header {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] header:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .logo {
    font-family: 'Playfair Display', serif;
}

[data-theme="dark"] nav a {
    color: #ffffff;
}

[data-theme="dark"] #theme-toggle svg {
    color: var(--text-color);
}

[data-theme="dark"] #theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: none;
}

/* 响应式设计更新 */
@media (max-width: 768px) {
    .theme-switch {
        margin: 0;
        width: 30%;
        padding: 0.3rem 0.2rem;
        border-bottom: 1px solid #eee;
    }

    #theme-toggle {
        width: 20%;
        justify-content: center;
        padding: 0.1rem;
        border-radius: 12px;
    }

    [data-theme="dark"] .theme-switch {
        border-bottom-color: var(--border-color);
    }
}

/* 添加CSS变量 */
:root {
    --primary-color: #00c805;
    --primary-gradient-end: #00a004;
    --bg-color: #ffffff;
    --secondary-bg-color: #f8f9fa;
    --text-color: #1a1a1a;
    --secondary-text-color: #6c757d;
    --border-color: #e9ecef;
    --hover-bg-color: #f1f3f5;
    --success-color: #00c805;
    --success-bg-color: rgba(0, 200, 5, 0.1);
    --danger-color: #dc3545;
    --danger-bg-color: rgba(220, 53, 69, 0.1);

    /* Bank page specific variables */
    --balance-card-bg: linear-gradient(45deg, var(--primary-color), var(--primary-gradient-end));
    --balance-card-text-color: #ffffff;
    --balance-card-detail-text-color: rgba(255, 255, 255, 0.8);
    --balance-card-header-text-color: rgba(255, 255, 255, 0.9);
    --action-button-bg: #ffffff;
    --action-button-text: var(--primary-color);
}

[data-theme="dark"] {
    --primary-color: #00e606;
    --primary-gradient-end: #00c805;
    --bg-color: #121212;
    --secondary-bg-color: #1e1e1e;
    --text-color: #ffffff;
    --secondary-text-color: #a0a0a0;
    --border-color: #2c2c2c;
    --hover-bg-color: #252525;
    --success-color: #00e606;
    --success-bg-color: rgba(0, 230, 6, 0.15);
    --danger-color: #ff4d4d;
    --danger-bg-color: rgba(255, 77, 77, 0.15);

    /* Bank page specific variables */
    --balance-card-bg: linear-gradient(45deg, #2c2c2c, #1e1e1e);
    --balance-card-text-color: #ffffff;
    --balance-card-detail-text-color: #a0a0a0;
    --balance-card-header-text-color: #e0e0e0;
    --action-button-bg: var(--primary-color);
    --action-button-text: #ffffff;
}

/* 亮色模式样式 */
[data-theme="light"] header {
    background-color: rgba(255, 255, 255, 0.05);
    color: #1a1a1a;
}

[data-theme="light"] header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .logo {
    font-family: 'Playfair Display', serif;
    color: #1a1a1a;
}

[data-theme="light"] nav a {
    color: #1a1a1a;
}

[data-theme="light"] nav a:hover, 
[data-theme="light"] nav a.active {
    color: #00c805;
    background-color: rgba(0, 200, 5, 0.2);
}

.auth-button.signup {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

/* Profile Button and Dropdown */
.profile-container, .profile-container-mobile {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.profile-button:hover {
    background-color: var(--hover-bg-color);
}

.profile-button img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.profile-button span {
    font-weight: 600;
    color: var(--text-color);
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: 240px;
    z-index: 100;
    overflow: hidden;
    padding-top: 10px;
    padding-bottom: 10px;
}

.profile-dropdown.show {
    display: block;
}

.dropdown-header {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 5px;
}

.dropdown-header span {
    display: block;
    color: var(--text-color);
}

.dropdown-header span:first-child {
    font-weight: 700;
    font-size: 1.1rem;
}

.dropdown-header span:last-child {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}

.profile-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.profile-dropdown a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

#logout-button {
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
    padding-top: 12px;
}

/* Mobile Profile Styles */
.profile-container-mobile {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    padding: 1rem 0;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.profile-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.profile-info div {
    display: flex;
    flex-direction: column;
}

.profile-info span {
    color: var(--text-color);
}

#mobile-profile-username {
    font-weight: 700;
    font-size: 1.2rem;
}

#mobile-profile-email {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}

.auth-button.logout {
    width: 100%;
    text-align: center;
    background-color: var(--danger-color);
    color: #fff;
    border: none;
}

.desktop-nav ul li a {
    color: #111 !important;
}
[data-theme='dark'] .desktop-nav ul li a {
    color: #fff !important;
}

.mobile-nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.7rem 0;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--primary-color);
}

[data-theme='dark'] .profile-dropdown {
    background: #f5ecd7 !important;
    color: #111 !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.10);
}
[data-theme='dark'] .profile-dropdown * {
    color: #111 !important;
}
[data-theme='dark'] .profile-dropdown a:hover {
    background: #ece3c7 !important;
    color: #111 !important;
}
[data-theme='dark'] .profile-dropdown .dropdown-header span {
    color: #111 !important;
}

[data-theme='dark'] .mobile-nav-container {
    background: #f5ecd7 !important;
    color: #111 !important;
}
[data-theme='dark'] .mobile-nav-container * {
    color: #111 !important;
}
[data-theme='dark'] .mobile-nav-links a {
    color: #111 !important;
}
[data-theme='dark'] .moon-icon {
    stroke: #fff !important;
    color: #fff !important;
    fill: none !important;
}

[data-theme='dark'] .mobile-nav-links .active,
[data-theme='dark'] .mobile-nav-links .selected {
    background: #111 !important;
    color: #fff !important;
}
[data-theme='dark'] .mobile-nav-links a {
    color: #111 !important;
}
[data-theme='dark'] .mobile-nav-links .inactive {
    background: #f5ecd7 !important;
    color: #111 !important;
}

[data-theme='dark'] .menu-button {
    background: #f5ecd7 !important;
}
[data-theme='dark'] .menu-button span {
    background: #111 !important;
}







