
.mypage-container,
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (min-width: 769px) {
    .mypage-container,
    .profile-container {
        padding: 40px 24px;
    }
}

.profile-header {
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

@media (min-width: 769px) {
    .profile-header {
        flex-direction: row;
        text-align: left;
        padding: 32px;
        gap: 24px;
    }
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--color-cream);
    box-shadow: var(--shadow);
}

@media (min-width: 769px) {
    .profile-avatar {
        width: 120px;
        height: 120px;
    }
}

.avatar-edit-btn {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 36px;
    height: 36px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.avatar-edit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

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

.profile-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

@media (min-width: 769px) {
    .profile-name {
        justify-content: flex-start;
    }
}

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

/* 회원 등급 박스 */
.profile-level-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.profile-level-box .level-icon {
    font-size: 12px;
}
.profile-level-box.level-unverified {
    background: #f3f4f6;
    color: #6b7280;
    border: 1.5px solid #d1d5db;
}
.profile-level-box.level-verified {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1.5px solid #93c5fd;
}
.profile-level-box.level-admin {
    background: linear-gradient(135deg, #fef3c7, #fee2e2);
    color: #b45309;
    border: 1.5px solid #fbbf24;
}
.profile-level-box.level-line {
    background: #06C755;
    color: white;
    border: 1.5px solid #04a847;
    margin-bottom: 12px;
}

.profile-level-box.level-google {
    background: #fff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    margin-bottom: 12px;
}

.profile-level-box.level-kakao {
    background: #FEE500;
    color: #000000;
    border: 1.5px solid #e5cf00;
    margin-bottom: 12px;
}

/* 이메일 인증 안내 박스 */
.email-verify-box {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
    max-width: 320px;
}
.email-verify-box .verify-desc {
    font-size: 13px;
    color: #92400e;
    margin-bottom: 12px;
    line-height: 1.5;
}
.email-verify-box .btn {
    width: 100%;
}

.profile-bio {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.bio-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.profile-stats {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 769px) {
    .profile-stats {
        justify-content: flex-start;
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-cream);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
}

.stat-item.clickable {
    cursor: pointer;
}

.stat-item.clickable:hover {
    background: var(--primary-color);
}

.follow-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--secondary-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.follow-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.follow-btn.following {
    background: var(--color-white);
}

.mypage-tabs,
.design-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.mypage-tab,
.design-tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.mypage-tab:hover,
.design-tab:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    background: var(--color-cream);
}

.mypage-tab.active,
.design-tab.active {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.designs-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 769px) {
    .designs-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

.design-card {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

@media (min-width: 769px) {
    .design-card {
        transition: all var(--transition-fast);
    }
    .design-card:hover {
        transform: translate(-3px, -3px);
        box-shadow: var(--shadow-lg);
    }
}

.design-thumbnail {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--color-cream);
    cursor: pointer;
}

.design-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-card[data-type="2d"] .design-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.design-card[data-type="2d"] .design-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f6f0;
}

.design-card[data-type="3d"] .design-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.design-card[data-type="3d"] .design-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
}

.design-card[data-type="3d"] .design-thumbnail canvas,
.design-thumbnail canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    pointer-events: none;
    z-index: 1;
    background: #f8f8f8;
}

@media (min-width: 769px) {
    .design-thumbnail img {
        transition: transform 0.3s ease;
    }
    .design-card:hover .design-thumbnail img {
        transform: scale(1.05);
    }
}

.design-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.visibility-badge {
    padding: 4px 8px;
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-weight: 700;
    box-shadow: 2px 2px 0 var(--border-color);
}

.visibility-badge.public {
    background: var(--color-mint);
}

.visibility-badge.private {
    background: var(--color-cream);
    color: var(--text-muted);
}

.visibility-badge.draft {
    background: #ffeb3b;
    color: #333;
    border-color: #f9a825;
}

.type-badge {
    padding: 4px 6px;
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-weight: 700;
    box-shadow: 2px 2px 0 var(--border-color);
}

.type-badge.3d {
    background: var(--accent-color);
    color: white;
}

.design-more-wrap {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
}

.design-more-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 2px 2px 0 var(--border-color);
    color: var(--text-muted);
}

.design-more-btn:hover {
    background: var(--color-cream);
    color: var(--text-color);
}

.design-more-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    box-shadow: 4px 4px 0 var(--border-color);
    min-width: 140px;
    overflow: hidden;
    z-index: 10;
}

.design-more-menu.show {
    display: block;
}

.design-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    text-align: left;
    color: var(--text-color);
}

.design-menu-item:hover {
    background: var(--color-cream);
}

.design-menu-item.delete {
    color: var(--danger-color);
}

.design-menu-item.delete:hover {
    background: #fee;
}

.draft-card {
    border-style: dashed;
    border-color: #f9a825;
}

.draft-card .design-thumbnail {
    opacity: 0.8;
}

.draft-actions-wrap {
    display: flex;
    gap: 4px;
}

.draft-actions-wrap .design-more-btn.delete {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.draft-actions-wrap .design-more-btn.delete:hover {
    background: #fee;
}

.draft-stats {
    justify-content: center;
}

.draft-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.design-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 2px 2px 0 var(--border-color);
}

.my-design-card .card-info {
    padding: 10px 12px;
}

.my-design-card .card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-design-card .card-title a {
    color: var(--text-color);
    text-decoration: none;
}

.my-design-card .card-title a:hover {
    color: var(--accent-color);
}

.my-design-card .card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.my-design-card .card-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.my-design-card .card-stats img,
.my-design-card .card-stats svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.my-design-card .card-stats .stat-like,
.my-design-card .card-stats .stat-comment {
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.my-design-card .card-stats .stat-like:hover,
.my-design-card .card-stats .stat-comment:hover {
    opacity: 0.7;
}

.my-design-card .card-stats .stat-like .like-count,
.my-design-card .card-stats .stat-comment .comment-count {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background var(--transition-fast);
}

.my-design-card .card-stats .stat-like .like-count:hover,
.my-design-card .card-stats .stat-comment .comment-count:hover {
    background: rgba(0, 0, 0, 0.1);
}

.design-info {
    padding: 14px;
}

.design-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    color: var(--text-color);
}

.design-title:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.design-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.my-like-btn,
.my-comment-btn,
.my-view-stat {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.my-view-stat {
    cursor: default;
}

.my-like-btn img,
.my-comment-btn img,
.my-view-stat img {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    opacity: 0.7;
}

.my-like-count,
.my-comment-count,
.my-view-count {
    font-size: 12px;
    color: var(--text-muted);
}

.my-like-btn:hover,
.my-comment-btn:hover {
    background: var(--color-cream);
}

.my-like-btn:hover img,
.my-comment-btn:hover img {
    opacity: 1;
}

.new-design-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 1;
    background: var(--color-cream);
    border: var(--border-width) dashed var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
}

.new-design-btn:hover {
    background: var(--primary-color);
    border-style: solid;
    box-shadow: var(--shadow);
    transform: translate(-3px, -3px);
    color: var(--text-color);
}

.mypage-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.security-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (min-width: 769px) {
    .security-page-container {
        padding: 40px 24px;
    }
}


.security-card {
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.security-card.danger-zone {
    border-color: var(--danger-color);
    background: var(--color-peach);
}

.security-card-header {
    padding: 20px 24px;
    background: var(--color-cream);
    border-bottom: var(--border-width) solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-card.danger-zone .security-card-header {
    background: #ffe0e0;
}

.security-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.security-card-body {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.security-card-label {
    font-weight: 700;
    margin-bottom: 4px;
}

.security-card-desc {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-security {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-security-primary {
    background: var(--primary-color);
}

.btn-security-danger {
    background: var(--danger-color);
    color: var(--text-on-dark);
}

.btn-security:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}


.edit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.edit-modal.show {
    opacity: 1;
    visibility: visible;
}

.edit-modal-content {
    background: var(--card-bg);
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    max-width: 400px;
    width: 100%;
}

.edit-modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.edit-modal-content .form-group {
    margin-bottom: 16px;
}

.edit-modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
}

.edit-modal-content input {
    width: 100%;
    padding: 12px 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.notifications-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px;
}

.notif-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.filter-btn.active {
    background: var(--primary-color);
}

.notif-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.notif-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.notif-item.unread {
    background: var(--color-cream);
    border-left: 4px solid var(--primary-color);
}

.notif-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
}

.notif-content {
    flex: 1;
}

.notif-message {
    font-weight: 600;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 13px;
    color: var(--text-muted);
}

.follow-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.follow-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.follow-item-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    border: var(--border-width) solid var(--border-color);
}

.follow-item-info {
    flex: 1;
}

.follow-item-name {
    font-weight: 700;
    font-size: 15px;
}

.follow-item-stats {
    font-size: 13px;
    color: var(--text-muted);
}

.profile-section {
    background: var(--color-white);
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

@media (min-width: 769px) {
    .profile-section {
        padding: 32px;
    }
}

.profile-edit-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.profile-edit-btn .edit-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.profile-edit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.profile-edit-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--border-color);
}

@media (max-width: 600px) {
    .profile-edit-btn {
        padding: 10px;
        gap: 0;
    }
    .profile-edit-btn .edit-icon {
        width: 18px;
        height: 18px;
    }
    .profile-edit-btn .edit-text {
        display: none;
    }
}

.profile-section .profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.profile-section .profile-avatar {
    width: 100px;
    height: 100px;
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
}

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

.profile-edit-content {
    max-width: 420px;
}

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

.profile-edit-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-cream);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    background: var(--primary-color);
}

.profile-edit-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: var(--border-width) solid var(--border-color);
}

.profile-edit-avatar-wrap {
    position: relative;
    display: inline-block;
}

.profile-edit-avatar {
    width: 80px;
    height: 80px;
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

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

.profile-edit-avatar-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #e74c3c;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all var(--transition-fast);
}

.profile-edit-avatar-remove:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.profile-edit-avatar-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.profile-edit-avatar-btns .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.btn-danger-outline {
    background: var(--color-white);
    color: #e74c3c;
    border: var(--border-width) solid #e74c3c;
}

.btn-danger-outline:hover {
    background: #fde8e8;
}

.profile-edit-field {
    margin-bottom: 16px;
}

.profile-edit-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-color);
}

.profile-edit-field input,
.profile-edit-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 14px;
    background: var(--color-white);
    box-sizing: border-box;
}

.profile-edit-field textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.profile-edit-field input:focus,
.profile-edit-field textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 2px 2px 0 var(--border-color);
}

.profile-edit-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: var(--border-width) solid var(--border-color);
}

.profile-edit-buttons .btn {
    min-width: 100px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
}

.profile-section .avatar-edit-btn {
    display: none;
}

.avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 4px 4px 0 var(--border-color);
    padding: 8px;
    min-width: 180px;
    display: none;
    z-index: 100;
}

.avatar-menu.show {
    display: block;
}

.avatar-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.avatar-menu-item:hover {
    background: var(--primary-color);
}

.avatar-menu-item.danger {
    color: var(--danger-color);
}

.avatar-menu-item.danger:hover {
    background: var(--color-peach);
}

.profile-section .profile-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-section .profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.profile-section .name-edit-btn {
    width: 28px;
    height: 28px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 var(--border-color);
    transition: all var(--transition-fast);
    padding: 0;
    flex-shrink: 0;
}

.profile-section .name-edit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

.profile-section .name-edit-btn .edit-icon {
    width: 14px;
    height: 14px;
}

.profile-section .profile-bio-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.profile-section .profile-bio {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.profile-section .bio-edit-btn {
    width: 24px;
    height: 24px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 var(--border-color);
    transition: all var(--transition-fast);
    padding: 0;
    flex-shrink: 0;
}

.profile-section .bio-edit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

.profile-section .bio-edit-btn .edit-icon {
    width: 12px;
    height: 12px;
}

.profile-section .profile-email,
.profile-section .profile-joined {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 4px 0;
}

.follow-box {
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin-top: 20px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 300px;
}

.follow-box-item {
    flex: 1;
    padding: 14px 20px;
    background: var(--color-cream);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.follow-box-item:hover {
    background: var(--primary-color);
}

.follow-box-line {
    width: 2px;
    background: var(--border-color);
    align-self: stretch;
}

.follow-box-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.follow-box-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-color);
}

/* 포인트 박스 */
.mypage-points-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px auto 0;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1.5px solid var(--color-primary);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.mypage-points-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mypage-points-box .points-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
}

.mypage-points-box .points-arrow {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 300;
}

.type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.type-tab {
    padding: 8px 16px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.type-tab:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    background: var(--color-cream);
}

.type-tab.active {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.filter-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 8px 16px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    background: var(--color-cream);
}

.filter-btn.active {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.design-picker-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 1000);
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
}

.design-picker-modal.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.design-picker-content {
    background: var(--color-white);
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--border-color);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.design-picker-header {
    padding: 16px 20px;
    background: var(--color-cream);
    border-bottom: var(--border-width) solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.design-picker-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.design-picker-close {
    width: 32px;
    height: 32px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    transition: all var(--transition-fast);
    line-height: 1;
}

.design-picker-close:hover {
    background: var(--color-peach);
}

.design-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.design-picker-body .empty-state {
    padding: 40px 20px;
}

.design-picker-body .empty-state-icon img,
.design-picker-body .empty-state-svg {
    width: 56px;
    height: 56px;
    opacity: 0.35;
}

.design-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.design-picker-item {
    aspect-ratio: 1;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--color-cream);
}

.design-picker-item:hover {
    transform: translate(-3px, -3px);
    box-shadow: 4px 4px 0 var(--border-color);
    border-color: var(--accent-color);
}

.design-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.show {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.crop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.crop-modal.show {
    display: flex;
}

.crop-modal-content {
    background: var(--color-white);
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--color-cream);
}

.crop-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.crop-modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.crop-modal-close:hover {
    background: var(--primary-color);
}

.crop-wrapper {
    padding: 16px;
    background: #1a1a1a;
}

.crop-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 320px;
    margin: 0 auto;
    overflow: hidden;
    touch-action: none;
    background: #000;
    cursor: move;
}

.crop-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.crop-frame-fixed {
    position: absolute;
    top: 7.5%;
    left: 7.5%;
    width: 85%;
    height: 85%;
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
    pointer-events: none;
    z-index: 10;
}

.crop-overlay-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
    background: 
        linear-gradient(to right, rgba(0,0,0,0.6) 7.5%, transparent 7.5%, transparent 92.5%, rgba(0,0,0,0.6) 92.5%),
        linear-gradient(to bottom, rgba(0,0,0,0.6) 7.5%, transparent 7.5%, transparent 92.5%, rgba(0,0,0,0.6) 92.5%);
}

.crop-hint {
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    background: var(--color-cream);
    border-top: var(--border-width) solid var(--border-color);
}

.crop-buttons {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-top: var(--border-width) solid var(--border-color);
}

.crop-buttons .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
}

.profile-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (min-width: 769px) {
    .profile-page-container {
        padding: 40px 24px;
    }
}

.profile-card {
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

@media (min-width: 769px) {
    .profile-card {
        padding: 32px;
    }
}

.profile-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

@media (min-width: 769px) {
    .profile-card-inner {
        flex-direction: row;
        text-align: left;
        gap: 32px;
    }
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border: var(--border-width-thick) solid var(--border-color);
    border-radius: var(--radius);
    background: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}

@media (min-width: 769px) {
    .profile-avatar-large {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
}

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

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

.profile-nickname {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

@media (min-width: 769px) {
    .profile-nickname {
        justify-content: flex-start;
        font-size: 2rem;
    }
}

.profile-bio-display {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 500px;
}

.profile-bio-empty {
    color: var(--text-muted);
    font-style: italic;
}

.profile-follow-stats {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

@media (min-width: 769px) {
    .profile-follow-stats {
        justify-content: flex-start;
    }
}

.follow-stat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--color-cream);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.follow-stat-btn:hover {
    background: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
}

.follow-stat-btn strong {
    font-size: 16px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

@media (min-width: 769px) {
    .profile-actions {
        justify-content: flex-start;
    }
}

.btn-follow-large {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--secondary-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow);
}

.btn-follow-large:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-follow-large:active {
    transform: translate(1px, 1px);
    box-shadow: var(--shadow-sm);
}

.btn-follow-large.following {
    background: var(--color-white);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 769px) {
    .profile-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.stat-card {
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    display: block;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-designs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 769px) {
    .profile-designs-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

.profile-design-card {
    position: relative;
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

@media (min-width: 769px) {
    .profile-design-card {
        transition: all var(--transition-fast);
    }
    .profile-design-card:hover {
        transform: translate(-3px, -3px);
        box-shadow: var(--shadow-lg);
    }
}

.profile-design-card .design-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--color-cream);
    cursor: pointer;
    display: block;
}

.profile-design-card .design-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-design-card[data-type="2d"] .design-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.profile-design-card[data-type="2d"] .design-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f6f0;
}

.profile-design-card[data-type="3d"] .design-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.profile-design-card[data-type="3d"] .design-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
}

.profile-design-card .design-thumb .no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.profile-design-card .type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-weight: 700;
    box-shadow: 2px 2px 0 var(--border-color);
    z-index: 2;
}

.profile-design-card .type-badge.type-3d {
    background: var(--accent-color);
    color: white;
}

.profile-design-card .card-info {
    padding: 12px;
}

.profile-design-card .card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-design-card .card-title a {
    color: var(--text-color);
    text-decoration: none;
}

.profile-design-card .card-title a:hover {
    color: var(--accent-color);
}

.profile-design-card .card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-design-card .card-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.profile-design-card .card-stats img,
.profile-design-card .card-stats svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.profile-design-card .card-stats .stat-like {
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.profile-design-card .card-stats .stat-like:hover {
    opacity: 0.7;
}

.profile-design-card .card-stats .stat-like.liked img {
    opacity: 1;
}

.profile-design-card .card-stats .stat-like .like-count {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background var(--transition-fast);
}

.profile-design-card .card-stats .stat-like .like-count:hover {
    background: rgba(0, 0, 0, 0.1);
}

.profile-design-card .card-stats .stat-comment {
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.profile-design-card .card-stats .stat-comment:hover {
    opacity: 0.7;
}

.profile-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.profile-empty svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.profile-empty p {
    color: var(--text-muted);
    font-size: 15px;
}

.profile-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.profile-pagination .page-btn {
    width: 40px;
    height: 40px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--color-white);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.profile-pagination .page-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.profile-pagination .page-btn.active {
    background: var(--primary-color);
}

/* ===== 프로필 편집 탭 ===== */
.profile-edit-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 4px;
}

.profile-edit-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.profile-edit-tab:hover {
    color: var(--text-color);
}

.profile-edit-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-edit-tab-content {
    display: none;
}

.profile-edit-tab-content.active {
    display: block;
}

/* ===== 주소 관리 ===== */
.address-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.address-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

.address-card {
    background: #f9f9f9;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.address-card.default {
    border-color: var(--primary-color);
    background: #fffdf5;
}

.address-default-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--primary-color);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
}

.address-info {
    margin-bottom: 12px;
}

.address-info strong {
    font-size: 15px;
    display: block;
    margin-bottom: 6px;
}

.address-info p {
    margin: 2px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.address-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.address-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger-outline {
    color: #f44336;
    border-color: #f44336;
}

.btn-danger-outline:hover {
    background: #ffebee;
}

.btn-block {
    width: 100%;
}

/* ===== 보안 탭 ===== */
.security-section {
    background: #f9f9f9;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.security-section h4 {
    margin: 0 0 8px;
    font-size: 15px;
}

.security-section .security-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 16px;
}

.security-section.danger-zone {
    border-color: #ffcdd2;
    background: #fff5f5;
}

.security-section.danger-zone h4 {
    color: #c62828;
}

/* ===== 주소 폼 ===== */
#addressFormModal .edit-modal-content {
    max-width: 500px;
}

#addressFormModal .form-row {
    display: flex;
    gap: 12px;
}

#addressFormModal .form-row .form-group {
    flex: 1;
}

#addressFormModal .form-group {
    margin-bottom: 16px;
}

#addressFormModal .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

#addressFormModal .form-group input,
#addressFormModal .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 14px;
}

#addressFormModal .form-group input:focus,
#addressFormModal .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

#addressFormModal .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    cursor: pointer;
}

#addressFormModal .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}


/* NFT Badge for Mypage */
.nft-badge-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    z-index: 5;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.4);
    transition: all 0.2s ease;
}

.nft-badge-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.6);
}

.purchased-badge-profile {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-xs, 4px);
    z-index: 5;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

.design-thumbnail {
    position: relative;
}

/* ===== NFT Modal Styles ===== */
.nft-form {
    padding: 0;
}

.nft-preview-3d-container {
    background: #1a1a2e;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.nft-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.nft-preview-controls {
    display: flex;
    gap: 6px;
}

.nft-preview-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.nft-preview-btn:hover {
    background: rgba(255,255,255,0.25);
}

.nft-preview-btn.active {
    background: #f4e637;
    color: #1a1a1a;
}

.nft-preview-canvas-wrap {
    position: relative;
    height: 250px;
}

.nft-preview-canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.nft-preview-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

.nft-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.nft-info-row .nft-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.nft-type-badge {
    padding: 4px 10px;
    background: var(--primary-color);
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 700;
}

.nft-admin-free {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    margin-bottom: 16px;
    color: #fff;
}

.admin-badge {
    font-size: 14px;
}

.free-text {
    font-size: 13px;
    opacity: 0.9;
}

.nft-price-box {
    margin-bottom: 16px;
}

.nft-price-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.nft-price-options {
    display: flex;
    gap: 10px;
}

.nft-price-option {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.nft-price-option:hover:not(.disabled) {
    border-color: var(--primary-color);
}

.nft-price-option.selected {
    border-color: var(--primary-color);
    background: rgba(244, 230, 55, 0.1);
}

.nft-price-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nft-price-option input {
    display: none;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.option-price {
    font-size: 18px;
    font-weight: 700;
}

.option-balance {
    font-size: 11px;
    color: var(--text-muted);
}

.nft-wallet-box {
    margin-bottom: 16px;
}

.nft-wallet-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* 지갑 선택 드롭다운 */
.nft-wallet-select-wrap {
    margin-bottom: 10px;
}
.nft-wallet-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background: white;
    cursor: pointer;
}
.nft-wallet-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.nft-wallet-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: monospace;
}

.nft-wallet-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* NFT 지갑 주소 검증 상태 */
.nft-wallet-status {
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
}
.nft-wallet-status.valid {
    color: #22c55e;
}
.nft-wallet-status.warning {
    color: #f59e0b;
}
.nft-wallet-status.error {
    color: #ef4444;
}
.nft-wallet-status .fix-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 8px;
}
.nft-wallet-status .fix-btn:hover {
    background: #7c3aed;
}

.nft-wallet-hint {
    font-size: 11px;
    color: var(--danger-color);
    margin-top: 6px;
}

.nft-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.nft-actions .btn {
    flex: 1;
}

.nft-mint-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #764ba2 !important;
}

.nft-note {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text-muted);
}

.nft-note p {
    margin: 4px 0;
}

.nft-success {
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.nft-links {
    margin-top: 20px;
}

/* ===== NFT Progress Styles ===== */
.nft-progress {
    padding: 20px;
    text-align: center;
}

.progress-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.progress-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-steps {
    text-align: left;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.progress-step:last-child {
    border-bottom: none;
}

.progress-step.active {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-step.active .step-icon {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.progress-step.done {
    color: var(--success-color);
}

.step-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.progress-note {
    font-size: 13px;
    color: var(--warning-color);
    background: rgba(255, 193, 7, 0.1);
    padding: 10px 16px;
    border-radius: var(--radius);
}

/* ===== NFT Details Styles ===== */
.nft-details {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 16px;
    margin: 20px 0;
    text-align: left;
}

.nft-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.nft-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-value.wallet,
.detail-value.mono {
    font-family: monospace;
    font-size: 12px;
}

.detail-value.link {
    color: var(--primary-color);
    text-decoration: none;
}

.detail-value.link:hover {
    text-decoration: underline;
}

.nft-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.nft-metamask-guide {
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 20px;
    text-align: left;
    font-size: 13px;
}

.nft-metamask-guide p {
    margin-bottom: 10px;
}

.nft-metamask-guide ol {
    margin: 0;
    padding-left: 20px;
}

.nft-metamask-guide li {
    margin: 6px 0;
}

.nft-metamask-guide code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    word-break: break-all;
}

/* NFT Error */
.nft-error {
    text-align: center;
    padding: 30px 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    color: var(--danger-color);
    margin-bottom: 20px;
}

/* NFT Info View */
.nft-info-view {
    padding: 10px;
}

.nft-info-view h3 {
    text-align: center;
    margin-bottom: 16px;
}

/* ===== NFT Disclaimer Styles ===== */
.nft-disclaimer {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: var(--radius);
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.nft-disclaimer p {
    margin: 6px 0;
}

.nft-disclaimer p:first-child {
    margin-top: 0;
    color: var(--danger-color);
    font-size: 12px;
}

.nft-disclaimer p:last-child {
    margin-bottom: 0;
}

/* ===== NFT Metadata Section ===== */
.nft-metadata-section {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.nft-metadata-header {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.nft-metadata-field {
    margin-bottom: 12px;
}

.nft-metadata-field:last-child {
    margin-bottom: 0;
}

.nft-metadata-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.nft-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg-primary);
    transition: border-color 0.2s;
}

.nft-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.nft-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    background: var(--bg-primary);
}

.nft-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.nft-char-count {
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* NFT Warning Box */
.nft-warning-box {
    display: flex;
    gap: 12px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border: 2px solid #ffc107;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.nft-warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.nft-warning-text strong {
    display: block;
    color: #856404;
    margin-bottom: 6px;
    font-size: 14px;
}

.nft-warning-text p {
    color: #856404;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

/* NFT Agreement Checkbox */
.nft-agreement {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: var(--radius);
}

.nft-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.nft-agreement-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Disabled Mint Button */
.nft-mint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
