* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0f;
    min-height: 100vh;
    padding: 0;
    color: #e0e0e0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 40px 60px;
    align-items: start;
}

/* 玩家頭像區域 */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    border: 1px solid #2a2a3e;
    position: sticky;
    top: 40px;
}

.avatar-container {
    flex-shrink: 0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    background: transparent;
    border: 3px solid #2a2a3e;
}

.profile-info {
    width: 100%;
    text-align: center;
}

.player-name {
    font-size: 2em;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #2a2a3e;
    border-radius: 12px;
    font-size: 0.9em;
    color: #a78bfa;
    margin-bottom: 12px;
    border: 1px solid #3a3a4e;
}

.region {
    font-size: 1em;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.region-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.region-text {
    display: inline-block;
}

.social-links {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-logo-link {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.85);
    border: 1px solid #2a2a3e;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.social-logo-link:hover {
    transform: translateY(-2px);
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
    background: rgba(20, 25, 32, 0.95);
}

.social-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.social-logo-fallback {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.visitor-count {
    margin-top: 20px;
    padding: 10px 14px;
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    font-size: 0.9em;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.visitor-icon {
    font-size: 1.1em;
}

.visitor-number {
    font-weight: 600;
    color: #a78bfa;
}

/* 內容區域 */
.content {
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 區塊樣式 */
.section {
    margin-bottom: 0;
    padding: 30px;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2a2a3e;
    transition: all 0.3s ease;
}

.section:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
}

.section-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2a2a3e;
}

/* Ranks 樣式 */
.rank-section h3 {
    font-size: 1.2em;
    color: #8b8b9e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-item {
    padding: 20px;
    background: #0f1419;
    border-radius: 8px;
    border: 1px solid #2a2a3e;
    transition: all 0.3s ease;
}

.account-item:hover {
    border-color: #7c3aed;
    background: #141920;
}

.account-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a3e;
}

.rank-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.current-rank,
.peak-rank {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.rank-label {
    font-size: 0.75em;
    color: #8b8b9e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.rank-badge {
    font-size: 1.3em;
    font-weight: 700;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rank-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Tier List 樣式 */
.tier-section h3 {
    font-size: 1.2em;
    color: #8b8b9e;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tier-category {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: #0f1419;
    border-radius: 8px;
    border: 2px solid #2a2a3e;
}

/* S級 - 金色邊框 */
.tier-category:first-child {
    border-color: #FFD700;
}

/* A級 - 藍色邊框 */
.tier-category:nth-child(2) {
    border-color: #4A90E2;
}

/* B級 - 綠色邊框 */
.tier-category:nth-child(3) {
    border-color: #4CAF50;
}

.tier-category:last-child {
    margin-bottom: 0;
}

.tier-label {
    font-size: 1.5em;
    font-weight: 700;
    color: #a78bfa;
    min-width: 40px;
    text-align: center;
}

.agent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2a2a3e;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    border: 1px solid #3a3a4e;
    transition: all 0.2s ease;
}

.agent-badge:hover {
    background: #3a3a4e;
    border-color: #7c3aed;
    transform: translateY(-2px);
}

.agent-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

/* Settings 樣式 */
.settings-section h3 {
    font-size: 1.2em;
    color: #8b8b9e;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-group {
    background: #0f1419;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a2a3e;
}

.setting-group h4 {
    font-size: 1em;
    color: #a78bfa;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a3e;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    color: #8b8b9e;
    font-size: 0.9em;
}

.setting-value {
    color: #e0e0e0;
    font-weight: 500;
}

/* Gaming Setup 樣式 */
.setup-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.equipment-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #0f1419;
    border-radius: 8px;
    border: 1px solid #2a2a3e;
    transition: all 0.3s ease;
}

.equipment-item:hover {
    border-color: #7c3aed;
    background: #1a1f2e;
    transform: translateY(-2px);
}

.equipment-icon {
    font-size: 2em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a3e;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    background: white;
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.fallback-icon {
    font-size: 1.5em;
    display: block;
    z-index: 0;
}

.brand-logo[style*="display: none"] ~ .fallback-icon {
    display: block;
}

.equipment-info {
    flex: 1;
}

.equipment-label {
    font-size: 0.75em;
    color: #8b8b9e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.equipment-name {
    font-size: 1em;
    color: #e0e0e0;
    font-weight: 500;
}

/* 牌位更新動畫 */
@keyframes rankUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    }
    100% {
        transform: scale(1);
    }
}

/* 載入動畫 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.rank-badge.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        padding: 30px 40px;
    }

    .profile-header {
        position: static;
        padding: 30px;
    }

    .content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .profile-header {
        padding: 24px 20px;
    }

    .avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5em;
    }

    .player-name {
        font-size: 1.5em;
    }

    .section {
        padding: 20px;
    }

    .rank-display {
        grid-template-columns: 1fr;
    }

    .tier-category {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .setup-section {
        grid-template-columns: 1fr;
    }
}

/* 頁尾版權 */
.footer {
    margin-top: 60px;
    padding: 40px 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 1px solid #2a2a3e;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.copyright {
    font-size: 0.95em;
    color: #a0aec0;
    margin-bottom: 12px;
}

.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a78bfa;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9em;
}

.footer-links a:hover {
    color: #c4b5fd;
}

.separator {
    margin: 0 12px;
    color: #4a4a5e;
}

.powered-by {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 20px;
        margin-top: 40px;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .separator {
        display: none;
    }
}