/* Gems Manager & Editor Custom Style Sheet */

.main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - var(--header-height));
    width: 100%;
}

.main-view.hidden {
    display: none !important;
}

/* 1. Gems Manager View Styling */
#gems-manager-view {
    background-color: var(--bg-color);
    overflow-y: auto;
    padding: 40px 48px;
}

/* 풀페이지 헤더 (타이틀 + 만들기 버튼) */
.gm-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 32px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.gems-manager-body {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.gm-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gm-title-wrapper h2 {
    font-size: 22px;
    font-weight: 600;
}

.gems-section {
    margin-bottom: 40px;
}

.gems-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.gems-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gems-section-header h3 {
    margin-bottom: 0;
}

.gems-create-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 4px 12px rgba(161, 121, 255, 0.2);
}

.gems-create-btn:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

/* 2. Gems Grid & Premium Google Parity Cards Styling */
.gems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.gem-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gem-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    background: var(--card-hover);
}

.gem-card-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.gem-card-avatar-wrapper {
    flex-shrink: 0;
}

.gem-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

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

.gem-card-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

.gem-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.gem-card-actions .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.gem-card-actions .icon-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.gem-card-actions .icon-btn svg {
    width: 16px;
    height: 16px;
}

/* 3. My Gems List (1열 가로 리스트형 레이아웃) */
#my-gems-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

#my-gems-grid .gem-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    padding: 16px 24px;
}

#my-gems-grid .gem-card-top {
    align-items: center;
    flex: 1;
    min-width: 0;
}

#my-gems-grid .gem-card-desc {
    -webkit-line-clamp: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#my-gems-grid .gem-card-actions {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
    align-items: center;
}

