:root {
    --primary-color: #306692;
    --white: #ffffff;
    --text-color: #333;
    --border-color: #e0e0e0;
    --tap-highlight: rgba(48, 102, 146, 0.1);
    --transition-time: 0.3s;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    color: var(--text-color);
    -webkit-tap-highlight-color: transparent;
    background-color: var(--white);
    animation: fadeIn 0.5s ease-out;
}

.profile-section {
    background-color: var(--primary-color);
    padding: 20px 15px 25px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-out forwards;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--white);
    margin-right: 15px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-image: url('../images/default-avatar.png');
}

.avatar:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-name {
    color: var(--white);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 5px;
}

.stat-item {
    text-align: center;
    color: var(--white);
    padding: 8px 5px;
    background-color: transparent;
    border-radius: 0;
    transition: transform var(--transition-time) ease;
}

.stat-item:active {
    transform: scale(0.96);
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.stat-label {
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.4;
}

.menu-section {
    padding: 20px 15px;
    margin-top: -10px;
    background: var(--white);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 9;
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.1s;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 12px;
    border-radius: 12px;
    transition: all var(--transition-time) ease;
    -webkit-tap-highlight-color: var(--tap-highlight);
    text-decoration: none;
    color: var(--text-color);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.menu-item:active {
    background: var(--tap-highlight);
    transform: scale(0.98);
}

.menu-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(48, 102, 146, 0.2);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.menu-item:active::after {
    animation: ripple 0.6s ease-out;
}

.menu-item i {
    width: 28px;
    margin-right: 12px;
    font-size: 20px;
    text-align: center;
    color: var(--primary-color);
}

.login-btn {
    display: block;
    width: calc(100% - 30px);
    padding: 16px;
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    border-radius: 12px;
    margin: 25px auto 15px;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-time) ease;
    -webkit-tap-highlight-color: var(--tap-highlight);
    box-shadow: 0 4px 8px rgba(48, 102, 146, 0.3);
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 16px;
}

.login-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(48, 102, 146, 0.3);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 16px;
    transition: all var(--transition-time) ease;
    -webkit-tap-highlight-color: var(--tap-highlight);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(48, 102, 146, 0.3);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform var(--transition-time) ease;
}

.nav-item:active i {
    transform: scale(0.9);
}

/* 动画效果 */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@media (min-width: 768px) {
    body {
        max-width: 450px;
        margin: 0 auto;
        box-shadow: 0 0 15px rgba(0,0,0,0.1);
        min-height: 100vh;
        position: relative;
    }

    .bottom-nav {
        max-width: 450px;
        left: 50%;
        transform: translateX(-50%);
    }
}