/* Mypage Layout CSS - Enhanced Mobile Responsive */
:root {
    --sidebar-width: 260px;
    --header-height: 70px;
    --accent-color: #00ff41;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Logo Font Override - Match index.html */
.logo a {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color) !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
}

.mypage-container {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #00ccff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-level {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 500;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section-title {
    padding: 0 20px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-left-color: var(--accent-color);
}

.menu-item.active {
    background: rgba(0, 255, 65, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

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

.menu-item span {
    font-size: 14px;
    font-weight: 500;
}

.menu-item .badge {
    margin-left: auto;
    background: var(--accent-color);
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-color), #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 25px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stats Card */
.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: rgba(0, 255, 65, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-icon i {
    font-size: 20px;
    color: var(--accent-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-change {
    font-size: 12px;
    margin-top: 8px;
}

.stat-change.positive {
    color: #00ff41;
}

.stat-change.negative {
    color: #ff4444;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #00ccff);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: rgba(0, 255, 65, 0.1);
}

/* Mobile Toggle - Moved to Header */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 1002;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.sidebar-toggle:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: scale(1.05);
}

.sidebar-toggle i {
    font-size: 20px;
    color: var(--accent-color);
    display: block;
}

/* Mobile Menu Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Wallet List Styles */
.wallet-item {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    transition: background 0.3s ease;
}

.wallet-item:hover {
    background: rgba(255,255,255,0.02);
}

.wallet-main-info {
    flex: 1;
    min-width: 0;
}

.wallet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.primary-badge {
    background: #00ff41;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.wallet-address {
    font-family: monospace;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-bottom: 10px;
    word-break: break-all;
    line-height: 1.4;
}

.wallet-balance-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-balance {
    color: #00ff41;
    font-weight: 600;
    font-size: 15px;
}

.btn-icon {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-icon:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.wallet-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 12px !important;
    font-size: 13px !important;
    width: auto !important;
}

.btn-delete {
    color: #ff4444 !important;
    border-color: rgba(255, 68, 68, 0.3) !important;
}

.btn-delete:hover {
    background: rgba(255, 68, 68, 0.1) !important;
    border-color: #ff4444 !important;
}

/* Responsive Design - Enhanced */
@media screen and (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        padding: 25px;
    }
}

@media screen and (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    /* Sidebar - Full screen mobile menu */
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
        width: 100%;
    }
    
    .content-header {
        margin-bottom: 20px;
    }

    .content-header h1 {
        font-size: 26px;
        margin-bottom: 6px;
    }
    
    .content-header p {
        font-size: 13px;
    }

    /* Grid - Single column on mobile */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Cards */
    .card {
        padding: 20px;
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card-header .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats Card */
    .stat-card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }
    
    /* Wallet List Mobile */
    .wallet-item {
        flex-direction: column;
        gap: 15px;
        padding: 16px;
    }
    
    .wallet-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .wallet-address {
        font-size: 11px;
    }
    
    .btn-icon {
        padding: 5px 8px;
        font-size: 13px;
    }
    
    /* Logo size adjustment - match index.html */
    .logo a {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    /* Sidebar Header */
    .sidebar-header {
        padding: 25px 20px;
    }
    
    .user-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .user-info h3 {
        font-size: 15px;
    }
    
    .user-level {
        font-size: 11px;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --header-height: 64px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .sidebar-toggle {
        top: 16px;
        right: 15px;
        padding: 10px 12px;
    }
    
    .sidebar-toggle i {
        font-size: 18px;
    }

    .main-content {
        padding: 16px 12px;
    }
    
    .content-header h1 {
        font-size: 22px;
    }
    
    .content-header p {
        font-size: 12px;
    }

    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }

    .card {
        padding: 16px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-subtitle {
        font-size: 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .logo a {
        font-size: 22px;
        letter-spacing: 1.8px;
    }
    
    /* Grid gap reduction */
    .grid {
        gap: 12px;
    }
}

@media screen and (max-width: 360px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        padding: 12px 10px;
    }
    
    .content-header h1 {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .card {
        padding: 14px;
    }
    
    .logo a {
        font-size: 20px;
        letter-spacing: 1.5px;
    }
}
