﻿/* 主容器 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 0 20px 30px;
    text-align: center;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.brand-accent {
    color: var(--accent-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 500;
}

.nav-item.active i {
    color: var(--accent-primary);
}

.nav-item i {
    font-size: 18px;
}

.sidebar-user {
    padding: 16px 12px;
    margin-top: auto;
    position: relative;
}

.user-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-info-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.user-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.user-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-card-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-card-avatar:hover::after {
    opacity: 1;
    content: '\F4CB';
    font-family: 'bootstrap-icons';
    color: var(--text-primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-card-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.user-card-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.user-info-card.active .user-card-arrow {
    transform: rotate(180deg);
}

.user-menu-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 12px;
    right: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
}

.user-menu-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 13px;
}

.user-menu-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.user-menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.user-menu-logout:hover {
    color: var(--accent-primary);
    background: rgba(255, 140, 0, 0.1);
}

.avatar-modal-content {
    max-width: 500px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    background: var(--bg-tertiary);
}

.avatar-option:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.avatar-option.selected {
    border-color: var(--accent-color);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-custom-url {
    margin-top: 20px;
}

.avatar-current-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 32px;
    color: var(--text-primary);
}

.avatar-current-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-settings-section {
    text-align: center;
    padding: 20px 0;
}

.radio-group-custom {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-option-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.radio-option-custom:hover {
    color: var(--text-primary);
}

.radio-option-custom input[type="radio"] {
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.btn-sm-custom {
    padding: 6px 14px;
    font-size: 12px;
}

.input-with-btn {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.input-with-btn .form-control {
    flex: 1;
}

.input-with-btn .send-code-btn {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 100px;
}

.input-with-btn .send-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#page-user-settings .config-card {
    height: 100%;
}

#page-user-settings .config-card .card-body-custom {
    display: flex;
    flex-direction: column;
}

.email-info-section {
    flex: 1;
}

@media (max-width: 992px) {
    #page-user-settings .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.email-desc,
.phone-desc {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.email-desc span,
.phone-desc span {
    color: var(--text-primary);
}

.email-info-section p,
.phone-info-section p {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.email-info-section span,
.phone-info-section span {
    color: var(--text-primary);
}


.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 140px;
}

.profile-welcome {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px;
    min-height: 100vh;
}

.page-content {
    animation: fadeIn 0.3s ease;
}

.page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.page-header h2 i {
    color: var(--accent-primary);
}

.apply-card {
    color: var(--text-primary);
}

.apply-card .card-body-custom {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 140px);
    padding: 20px;
}

.apply-card .apply-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.apply-card .apply-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.apply-card .apply-buttons .btn-apply {
    flex: 1;
}

.apply-card .apply-buttons .btn-cancel-apply {
    width: auto;
    margin-top: 0;
}

.apply-card:hover {
    border-color: var(--accent-primary);
}

.countdown-minutes {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-header-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-primary);
}

.apply-card .card-header-custom {
    border-bottom-color: rgba(255,255,255,0.2);
    color: var(--text-primary);
}

.card-header-custom .header-slash {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-primary);
}

.apply-card .card-header-custom .header-slash {
    color: var(--text-on-accent);
}

.team-card-header .header-slash {
    color: var(--accent-primary);
}

.card-body-custom {
    padding: 20px;
}

.card-body-custom p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.featured-event-info {
    margin-bottom: 16px;
}

.event-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    justify-content: flex-start;
}

.event-tag-published {
    padding: 4px 10px;
    background: rgba(76, 175, 80, 0.1);
    color: var(--color-green-tag);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.event-tag-featured {
    padding: 4px 10px;
    background: rgba(255, 140, 0, 0.1);
    color: var(--accent-primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.activity-tag-featured {
    padding: 4px 10px;
    background: rgba(255, 200, 0, 0.15);
    color: var(--color-yellow);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.featured-event-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
    text-transform: uppercase;
}

.featured-event-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    margin-bottom: 8px;
}

.featured-event-time {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}

.featured-event-time i {
    font-size: 12px;
}

.apply-card .card-body-custom p,
.apply-card .card-body-custom h4 {
    color: var(--text-primary);
}

.apply-card .card-body-custom h5 {
    color: var(--text-primary);
}

.profile-info-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.profile-text {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.profile-email {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.profile-codes {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
    height: 120px;
}

.profile-qr-code {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.profile-qr-code::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,140,0,0.08);
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-qr-code:hover::after {
    opacity: 1;
}

.profile-qr-code img,
.profile-qr-code canvas {
    display: block;
    width: 120px;
    height: 120px;
    background: transparent;
}

.profile-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.profile-qr-actions {
    margin-top: 10px;
}

.btn-copy-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    padding: 5px 10px;
    background: var(--text-on-accent);
    color: var(--text-primary);
    border: none;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    width: auto;
}

.btn-copy-qr:hover {
    background: var(--bg-tertiary);
}

.btn-copy-qr:active {
    transform: scale(0.97);
}

.btn-copy-qr i {
    font-size: 12px;
}

.profile-barcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.profile-barcode-modal svg {
    transform: rotate(-90deg);
    width: 80vw;
    max-width: 600px;
    height: auto;
}

.profile-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.profile-qr-modal img,
.profile-qr-modal canvas {
    width: 300px;
    height: 300px;
    image-rendering: pixelated;
}

.modal-close-hint {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-top: 20px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-brand,
    .nav-item span,
    .user-card-details,
    .user-card-arrow {
        display: none;
    }

    .sidebar-nav {
        padding: 0 8px;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .main-content {
        margin-left: 60px;
        padding: 16px;
    }

    .user-info-card {
        padding: 8px;
        justify-content: center;
    }

    .user-card-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .user-menu-popup {
        left: 8px;
        right: 8px;
    }
}
