/* Reset & Base Styles */
:root {
    --bg-light: #ffffff;
    --text-light: #213547;
    --border-light: rgba(0, 0, 0, 0.1);
    --card-bg-light: #ffffff;
    --bg-dark: #121212;
    --text-dark: #ffffff;
    --border-dark: rgba(255, 255, 255, 0.1);
    --card-bg-dark: #1e1e1e;
    --primary-color: #ff2442;
    --secondary-bg: rgba(0, 0, 0, 0.05);
}

:root.light {
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --border-color: var(--border-light);
    --card-bg: var(--card-bg-light);
}

:root.dark {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-dark);
    --border-color: var(--border-dark);
    --card-bg: var(--card-bg-dark);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.5;
}

/* Layout */
.app-container {
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    padding-top: 44px;
    padding-bottom: 50px;
}

/* 禁止回弹的基础样式 */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.app-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    position: relative;
    padding-top: 44px;
    padding-bottom: 50px;
}

/* 所有可滚动容器都添加禁止回弹 */ 
.profile-page {
    overscroll-behavior-y: contain;
}

/* Remove link underlines in projects-grid */
.projects-grid a {
    text-decoration: none;
}

/* 退出确认弹窗样式 */
#logoutConfirmModal.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#logoutConfirmModal .modal-content {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    width: 85%;
    max-width: 300px;
}

#logoutConfirmModal .modal-header {
    font-size: 18px;
    text-align: center;
    margin-bottom: 16px;
}

#logoutConfirmModal .modal-body {
    text-align: center;
    margin-bottom: 20px;
}

#logoutConfirmModal .modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

#logoutConfirmModal .modal-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#logoutConfirmModal .cancel-btn {
    background: var(--secondary-bg);
    color: var(--text-color);
}

#logoutConfirmModal .confirm-btn {
    background: var(--primary-color);
    color: white;
}

#logoutConfirmModal .modal-btn:hover {
    opacity: 0.9;
}
