:root {
    --primary-color: #007aff;
    --background-color: #f2f2f7;
    --card-background: #ffffff;
    --text-color: #1c1c1e;
    --secondary-text: #8e8e93;
    --danger-color: #ff3b30;
    --border-radius: 12px;
    
    /* Landing Page Specific */
    --landing-bg: #d2e823;
    --landing-text: #1e3a1e;
    --landing-btn-bg: #1e3a1e;
    --landing-btn-text: #ffffff;
    --landing-input-bg: #ffffff;

    /* Theme: Modern Gradient */
    --theme-modern-bg: linear-gradient(135deg, #7F00FF 0%, #E100FF 100%);
    --theme-modern-text: #ffffff;
    --theme-modern-btn-bg: rgba(255, 255, 255, 0.2);
    --theme-modern-btn-text: #ffffff;
    --theme-modern-btn-hover: rgba(255, 255, 255, 0.3);

    /* Theme: Minimal Dark */
    --theme-dark-bg: #121212;
    --theme-dark-text: #ffffff;
    --theme-dark-btn-bg: #1f1f1f;
    --theme-dark-btn-border: #333;
    --theme-dark-btn-text: #ffffff;

    /* Theme: Pop Art */
    --theme-pop-bg: #FFD700;
    --theme-pop-text: #000000;
    --theme-pop-btn-bg: #ffffff;
    --theme-pop-btn-shadow: 4px 4px 0px #000000;

    /* Theme: Clean (Hipetsy style) */
    --theme-clean-bg: #f3f3f1;
    --theme-clean-text: #1c1c1e;
    --theme-clean-btn-bg: #ffffff;
    --theme-clean-btn-text: #1c1c1e;
    --theme-clean-btn-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #e5e5e5; /* PC 端背景色 */
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 模拟手机屏幕容器 */
.mobile-wrapper {
    width: 100%;
    max-width: 414px; /* iPhone Max width */
    min-height: 100vh;
    background-color: var(--background-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Landing Page Wrapper Override */
.landing-wrapper {
    background-color: var(--landing-bg);
    color: var(--landing-text);
}

/* 如果是真正的移动设备，移除阴影和高度限制 */
@media (max-width: 480px) {
    body {
        background-color: var(--background-color);
        align-items: flex-start;
    }
    .mobile-wrapper {
        max-width: 100%;
        box-shadow: none;
        min-height: 100vh;
    }
}

.container {
    padding: 20px;
    flex: 1;
}

/* 标题样式 */
h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 20px 0 10px;
    text-align: center;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text-color);
    padding-left: 5px;
}

/* 表单元素 */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input[type="text"], input[type="password"], input[type="url"] {
    padding: 16px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--card-background);
    font-size: 16px;
    width: 100%;
    box-sizing: border-box; /* 确保 padding 不增加宽度 */
    -webkit-appearance: none; /* 移除 iOS 默认样式 */
}

input:focus {
    outline: 2px solid var(--primary-color);
}

/* 按钮样式 */
button, .btn {
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    transition: opacity 0.2s;
}

button:active, .btn:active {
    opacity: 0.8;
}

/* 链接列表 */
.links {
    display: flex;
    flex-direction: column;
    gap: 16px; /* 增加按钮间距 */
    width: 100%;
}

.links-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    background: var(--card-background);
    margin-bottom: 12px;
    padding: 16px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.link-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    margin-right: 10px;
}

.link-info strong {
    font-size: 16px;
    margin-bottom: 4px;
}

.link-url {
    font-size: 13px;
    color: var(--secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-btn {
    background-color: transparent;
    color: var(--danger-color);
    padding: 8px 12px;
    font-size: 14px;
    width: auto;
    margin: 0;
    border: 1px solid var(--danger-color);
}

/* 底部导航/操作栏 */
.bottom-actions {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
}

.text-center {
    text-align: center;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

.secondary-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: var(--secondary-text);
}

.error {
    background-color: #ffe5e5;
    color: var(--danger-color);
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

/* Profile specific adjustments */
.profile-pic {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background-color: #e1e1e1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: #666;
    margin: 0 auto 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden; /* Ensure image fits circle */
}

/* Landing Page Styles */
.landing-header {
    display: flex;
    justify-content: flex-end; /* 右对齐 */
    align-items: center;
    padding: 20px;
    background-color: transparent; /* 透明背景 */
    margin-bottom: 0;
    position: absolute; /* 绝对定位，浮在上方 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.landing-header .logo {
    display: none; /* 隐藏 Logo */
}

.landing-header-buttons {
    display: flex;
    align-items: center;
}

.landing-btn-login, .landing-btn-signup {
    display: none; /* 隐藏原来的按钮 */
}

.landing-hero {
    padding: 100px 30px 40px; /* 增加顶部内边距，因为 header 悬浮了 */
    text-align: left;
}

.landing-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--landing-text);
    text-align: left;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.landing-hero p {
    font-size: 16px;
    color: var(--landing-text);
    margin-bottom: 30px;
    line-height: 1.5;
}

.landing-input-group {
    background-color: #fff;
    border-radius: 12px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.landing-prefix {
    color: #888;
    font-weight: 500;
    margin-right: 4px;
    font-size: 16px;
}

.landing-input {
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    padding: 12px 0 !important;
    width: 100%;
}

.landing-input:focus {
    outline: none;
}

.landing-cta-btn {
    background-color: var(--landing-btn-bg);
    color: var(--landing-btn-text);
    border-radius: 50px;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    margin-top: 10px;
}

/* Overlay Menu */
.overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 100;
    display: none; /* 默认隐藏 */
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.overlay-menu.active {
    display: flex;
}

.menu-close-btn {
    align-self: flex-end;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    align-items: center;
}

.menu-item {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
}

/* =========================================
   Profile Themes
   ========================================= */

/* Theme Modern (Gradient) */
.theme-modern {
    background: var(--theme-modern-bg);
    color: var(--theme-modern-text);
}
.theme-modern .mobile-wrapper {
    background: transparent;
}
.theme-modern .profile-pic {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.theme-modern .link-item {
    background: var(--theme-modern-btn-bg);
    color: var(--theme-modern-btn-text);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}
.theme-modern .link-item:hover {
    background: var(--theme-modern-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}
.theme-modern .footer {
    color: rgba(255,255,255,0.7) !important;
}

/* Theme Dark (Minimal) */
.theme-dark {
    background-color: var(--theme-dark-bg);
    color: var(--theme-dark-text);
}
.theme-dark .mobile-wrapper {
    background-color: var(--theme-dark-bg);
}
.theme-dark .profile-pic {
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
}
.theme-dark h1 {
    color: #fff;
}
.theme-dark .link-item {
    background-color: var(--theme-dark-btn-bg);
    color: var(--theme-dark-btn-text);
    border: 1px solid var(--theme-dark-btn-border);
    border-radius: 8px; /* More squarish */
    box-shadow: none;
    transition: background-color 0.2s;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}
.theme-dark .link-item:hover {
    background-color: #333;
    border-color: #666;
}
.theme-dark .footer {
    color: #666 !important;
}

/* Theme Pop (Bold) */
.theme-pop {
    background-color: var(--theme-pop-bg);
    color: var(--theme-pop-text);
}
.theme-pop .mobile-wrapper {
    background-color: var(--theme-pop-bg);
}
.theme-pop .profile-pic {
    background-color: #000;
    color: #fff;
    border: 3px solid #000;
}
.theme-pop h1 {
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.theme-pop .link-item {
    background-color: var(--theme-pop-btn-bg);
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    box-shadow: var(--theme-pop-btn-shadow);
    transition: transform 0.1s, box-shadow 0.1s;
    font-weight: 800;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}
.theme-pop .link-item:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}
.theme-pop .link-item:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}
.theme-pop .footer {
    color: #000 !important;
    font-weight: bold;
}

/* Theme Clean (Light / Hipetsy) */
.theme-clean {
    background-color: var(--theme-clean-bg);
    color: var(--theme-clean-text);
}
.theme-clean .mobile-wrapper {
    background-color: var(--theme-clean-bg);
}
.theme-clean .profile-pic {
    background-color: #ddd;
    color: #555;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.theme-clean .link-item {
    background-color: var(--theme-clean-btn-bg);
    color: var(--theme-clean-btn-text);
    border: none;
    border-radius: 16px; /* 圆润的矩形 */
    box-shadow: var(--theme-clean-btn-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    padding: 18px 24px;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 64px;
    font-weight: 600;
    font-size: 16px;
}
.theme-clean .link-item:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
/* 模拟右侧的三个点 (装饰) */
.theme-clean .link-item::after {
    content: '•••';
    position: absolute;
    right: 24px;
    color: #ccc;
    font-size: 14px;
    letter-spacing: 2px;
    transform: rotate(90deg);
}
.theme-clean .footer {
    color: #999 !important;
}
