/* 메인 대시보드 */
.dashboard {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.dashboard-greeting {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.dashboard-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.dashboard-card-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

.usage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dashboard-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

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

.quick-launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.quick-launch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-launch-item:hover {
    background: var(--line);
    transform: translateY(-2px);
}

.quick-launch-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.quick-launch-name {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* 변경 후 - 클래스명 변경 */
.dashboard-notice-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.dashboard-notice-item:last-child {
    border-bottom: none;
}

.dashboard-notice-title {
    color: var(--text);
}

.dashboard-notice-date {
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}
/* 회원가입 모달 */
.signup-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.signup-step {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.signup-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 8px;
    transition: all 0.3s;
}

.signup-step.active .signup-step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.signup-step.completed .signup-step-number {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.signup-step-divider {
    width: 40px;
    height: 2px;
    background: var(--line);
    margin: 0 12px;
}

.signup-step.completed + .signup-step-divider {
    background: #10b981;
}

/* 인증 코드 입력 */
.verification-code-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.verification-code-input input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    transition: all 0.2s;
}

.verification-code-input input:focus {
    border-color: var(--accent);
    outline: none;
}

/* 타이머 */
.code-timer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
}

.code-timer.warning {
    color: #ef4444;
}

/* 비밀번호 강도 */
.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s;
    border-radius: 2px;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 4px;
}

.strength-weak {
    background: #ef4444;
    width: 33%;
}

.strength-medium {
    background: #f59e0b;
    width: 66%;
}

.strength-strong {
    background: #10b981;
    width: 100%;
}

/* 입력 필드 상태 */
.form-input.valid {
    border-color: #10b981;
}

.form-input.invalid {
    border-color: #ef4444;
}

.input-feedback {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-feedback.success {
    color: #10b981;
}

.input-feedback.error {
    color: #ef4444;
}

/* 약관 동의 */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.terms-link {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

:root {
    --transition-theme:
        background 0.3s, color 0.3s, border-color 0.3s;
}

[data-theme="dark"] {
    --bg: #1a1a2e;
    --bg-light: #16213e;
    --sidebar: #0f0f1a;
    --card: #1f1f3a;
    --text: #ffffff;
    --text-muted: #8888aa;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --line: #2a2a4a;
    --scrollbar-track: #1a1a2e;
    --scrollbar-thumb: #3a3a5a;
    --scrollbar-thumb-hover: #4a4a6a;
    --overlay: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] {
    --bg: #f6f6f6;
    --bg-light: #fafafa;
    --sidebar: #ffffff;
    --card: #ffffff;
    --text: #111111;
    --text-muted: #777777;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --line: #e9e9e9;
    --scrollbar-track: #f0f0f0;
    --scrollbar-thumb: #d1d1d1;
    --scrollbar-thumb-hover: #b1b1b1;
    --overlay: rgba(0, 0, 0, 0.5);
}

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

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
    font-family:
        "Pretendard",
        -apple-system,
        BlinkMacSystemFont,
        system-ui,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-theme);
}

.hidden {
    display: none !important;
}

.btn {
    height: 44px;
    padding: 0 24px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-muted);
}

.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.btn-xs {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
}

.btn-lg {
    height: 52px;
    padding: 0 32px;
    font-size: 16px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--sidebar);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.brand {
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--card);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--card);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-info:hover {
    background: var(--hover);
    box-shadow: 0 0 0 1px var(--accent);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.user-name {
    font-weight: 600;
}

.user-badge {
    background: var(--warning);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

/* 프로필 모달 */
.profile-info-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--line);
}

.profile-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

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

.profile-info-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        #6366f1 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 auto 8px;
}

.profile-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 20px 0;
}

.profile-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-token-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 8px;
}

.profile-token-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pw-strength {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.pw-strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--line);
    transition: background 0.3s;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg);
}

.main-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-section {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding: 0 8px;
}

/* 앱 헤더 - 실행 버튼 우측 배치 */
.app-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.app-header-info {
    flex: 1;
}

.app-header-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 140px;
}

.launch-hint-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

/* ===== Steam 스타일 히어로 섹션 ===== */
.app-hero {
    position: relative;
    margin: -32px -32px 0 -32px;
    height: 340px;
    overflow: hidden;
}

.app-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center top;
}

.app-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        var(--bg) 100%
    );
}

[data-theme="light"] .app-hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        var(--bg) 100%
    );
}

.app-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
}

.app-hero-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.app-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-hero-name {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .app-hero-name {
    color: var(--text);
}

.app-hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    max-width: 600px;
}

[data-theme="light"] .app-hero-desc {
    color: var(--text-muted);
}

.app-action-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.app-play-section {
    display: flex;
    align-items: center;
}

.btn-play {
    background: linear-gradient(135deg, #a4d007 0%, #7c9f1d 100%);
    color: #1a2e00;
    font-size: 16px;
    font-weight: 800;
    padding: 12px 32px;
    border-radius: 4px 0 0 4px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-play:hover:not(:disabled) {
    background: linear-gradient(135deg, #b6e008 0%, #8fb520 100%);
}

.btn-play:disabled {
    background: linear-gradient(135deg, #4a4a4a 0%, #333 100%);
    color: #888;
    cursor: not-allowed;
}

.btn-play-dropdown {
    background: linear-gradient(135deg, #8fb520 0%, #6b8c15 100%);
    color: #1a2e00;
    border: none;
    padding: 12px 14px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.app-meta-bar {
    display: flex;
    gap: 32px;
}

.app-meta-item-steam {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-meta-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.app-meta-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .app-meta-label {
    color: var(--text-muted);
}

[data-theme="light"] .app-meta-value {
    color: var(--text);
}

.app-hero-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
}

.app-hero-hint.logged-in {
    color: #a4d007;
}

.app-content-with-hero {
    padding-top: 0px;
}

/* 대표 이미지 */
.app-thumbnail {
    width: 100%;
    max-width: 100%; /* 전체 너비 사용 */
    margin: 0 0 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-thumbnail img {
    width: 100%;
    height: auto; /* max-height 제거 */
    display: block;
}

.app-thumbnail-label {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--line);
    text-align: center;
}

/* 반응형 - 모바일에서는 버튼 아래로 */
@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
    }

    .app-header-action {
        width: 100%;
        align-items: stretch;
    }

    .launch-hint-text {
        text-align: center;
    }
}

.app-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.app-item:hover {
    background: var(--card);
}

.app-item.active {
    background: var(--card);
    border-color: var(--accent);
}

.app-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

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

.app-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.app-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.app-tag.featured {
    background: var(--success);
    color: white;
}

.app-tag.new {
    background: var(--accent);
    color: white;
}

.app-tag.beta {
    background: var(--warning);
    color: white;
}

.sidebar-divider {
    height: 1px;
    background: var(--line);
    margin: 16px 8px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.app-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.app-header-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
}

.app-header-info {
    flex: 1;
}

.app-header-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.app-meta {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.app-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.launch-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.launch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.launch-info {
    flex: 1;
}

.launch-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

.launch-hint.logged-in {
    color: var(--success);
}

.features-section {
    margin-bottom: 32px;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}

.feature-icon {
    font-size: 24px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.feature-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.guide-section {
    margin-bottom: 32px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-step {
    display: flex;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.download-section {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.download-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    height: auto;
    position: relative;
}

.download-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        #7c3aed 100%
    );
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    /* [핵심] 아이콘이 절대 찌그러지지 않도록 고정 */
    flex-shrink: 0;
}

.download-info {
    /* [핵심] 텍스트 영역의 최소 너비 보장 (너무 좁아지면 줄바꿈 유도) */
    flex: 1 1 200px;
    min-width: 0; /* 텍스트 넘침 방지 안전장치 */
    word-break: break-all;
    overflow-wrap: break-word;
}

.download-card .btn {
    flex-shrink: 0; /* 버튼 크기 고정 */
    margin-left: auto; /* 버튼을 오른쪽 끝으로 밀어줌 (공간 충분할 때) */
}

.download-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.4;
}

.download-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
}

.download-meta {
    display: flex;
    flex-wrap: wrap; /* 메타 정보도 줄바꿈 허용 */
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.download-login-hint {
    font-size: 12px;
    color: var(--warning);
    margin-top: 8px;
}

.notice-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.notice-list {
    max-height: 600px;
    overflow-y: auto;
}

.notice-item {
    border-bottom: 1px solid var(--line);
}

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

.notice-header {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
}

.notice-header:hover {
    background: var(--bg);
}

.notice-header-left {
    flex: 1;
}

.notice-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.notice-title {
    font-size: 14px;
    font-weight: 500;
}

.notice-tag {
    display: inline-block;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 8px;
}

.notice-tag.update {
    background: var(--success);
    color: white;
}

.notice-tag.notice {
    background: var(--warning);
    color: white;
}

.notice-tag.event {
    background: var(--accent);
    color: white;
}

.notice-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.notice-item.open .notice-arrow {
    transform: rotate(180deg);
}

.notice-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg);
}

.notice-item.open .notice-content {
    max-height: 2000px; /* 500px → 2000px로 증가 */
    overflow-y: hidden; /* 스크롤 가능하게 추가 */
}

.notice-content-inner {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    max-height: calc(60vh - 40px); /* 패딩 고려 */
    overflow-y: auto; /* 내용만 스크롤 */
}

.notice-content-inner p {
    margin-bottom: 12px;
}

.notice-content-inner p:last-child {
    margin-bottom: 0;
}

.notice-content-inner ul {
    margin: 12px 0;
    padding-left: 20px;
}

.notice-content-inner li {
    margin-bottom: 6px;
}

.admin-header {
    margin-bottom: 24px;
}

.admin-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.admin-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.table-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-scroll {
    max-height: 500px;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    color: var(--text-muted);
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--bg);
}

.usage-bar {
    width: calc(100% + 32px);
    margin-left: -16px;
    height: 8px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    border-radius: 4px;
}

.usage-fill.ok {
    background: var(--success);
}

.usage-fill.warn {
    background: var(--warning);
}

.usage-fill.danger {
    background: var(--danger);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.action-btns {
    display: flex;
    gap: 6px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
}

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

.modal {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.modal-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

.modal-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

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

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

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions-row {
    display: flex;
    gap: 12px;
}

.modal-actions-row .btn {
    flex: 1;
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.app-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
}

.app-viewer-overlay.show {
    visibility: visible;
    opacity: 1;
}

.app-viewer-header {
    height: 52px;
    background: var(--sidebar);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.app-viewer-title {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.iframe-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.crop-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.iframe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.footer {
    background: var(--sidebar);
    border-top: 1px solid var(--line);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text);
}

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

    .content-scroll {
        padding: 20px;
    }

    .app-header {
        flex-direction: column;
        gap: 16px;
    }

    .app-header-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .app-header-title {
        font-size: 22px;
    }

    .launch-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 스크롤 시 고정되는 액션바 투명도 조절은 여기서 0.3 */
.app-action-bar-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px;
    margin: 0 -32px 24px -32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

[data-theme="dark"] .app-action-bar-sticky {
    background: rgba(30, 30, 30, 0.8);
}

.app-sticky-desc {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sticky-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.app-sticky-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

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

.app-sticky-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.app-sticky-meta {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.app-sticky-meta-item {
    text-align: center;
}

.app-sticky-meta-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.app-sticky-meta-value {
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .app-sticky-meta {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-action-bar-sticky {
        margin: 0 -20px 20px -20px;
        padding: 12px 16px;
    }

    .app-sticky-desc {
        display: none;
    }
}

/* ===== 스크린샷 갤러리 (개선) ===== */
.gallery-section {
    margin-bottom: 28px;
}

.gallery-container {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.gallery-main {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg);
    padding: 0;
}

.gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: none;
    transition: opacity 0.3s;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.gallery-nav.prev {
    left: 12px;
}

.gallery-nav.next {
    right: 12px;
}

.gallery-counter {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    background: var(--sidebar);
    border-top: 1px solid var(--line);
    justify-content: center;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.5;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.gallery-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 스크롤바 스타일 */
.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: var(--line);
    border-radius: 3px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* ===== 모바일 최적화 (480px 이하) ===== */
@media (max-width: 480px) {
    /* 헤더 */
    .header {
        padding: 8px 12px;
        gap: 8px;
    }

    .brand {
        font-size: 14px;
    }

    .brand-logo {
        height: 24px !important;
    }

    .header-nav {
        display: none;
    }

    .header-right {
        gap: 8px;
    }

    .user-info {
        padding: 4px 8px;
        gap: 6px;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    #headerLoginBtn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    /* 사이드바 숨기기 */
    .sidebar {
        display: none;
    }

    /* 콘텐츠 전체 너비 */
    .content {
        width: 100%;
    }

    .content-scroll {
        padding: 16px;
        padding-bottom: 80px;
    }

    /* 대시보드 */
    .dashboard {
        padding: 0;
    }

    .dashboard-greeting {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dashboard-card {
        padding: 16px 12px;
    }

    .dashboard-card-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .dashboard-card-title {
        font-size: 11px;
    }

    .dashboard-card-value {
        font-size: 20px;
    }

    /* 빠른 실행 그리드 */
    .quick-launch-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .quick-launch-item {
        padding: 12px 8px;
    }

    .quick-launch-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .quick-launch-name {
        font-size: 11px;
    }

    /* 앱 히어로 */
    .app-hero {
        height: 150px;
    }

    .app-hero-name {
        font-size: 22px;
    }

    /* 액션바 */
    .app-action-bar-sticky {
        margin: 0 -16px 16px -16px;
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .app-action-bar-sticky .btn {
        width: 100%;
    }

    /* 앱 헤더 (썸네일 없을 때) */
    .app-header {
        gap: 12px;
    }

    .app-header-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .app-header-title {
        font-size: 18px;
    }

    .app-header-desc {
        font-size: 13px;
    }

    /* 기능/가이드 그리드 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 16px;
    }

    /* 갤러리 */
    .gallery-main {
        max-height: 200px;
    }

    .gallery-thumbs {
        gap: 6px;
    }

    .gallery-thumb {
        width: 50px;
        height: 35px;
    }

    /* 모달 */
    .modal {
        margin: 10px;
        padding: 20px;
        max-height: 85vh;
    }

    .modal-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .modal-title {
        font-size: 18px;
    }

    /* 프로필 모달 */
    .profile-avatar-large {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .profile-info-item {
        padding: 10px 12px;
    }

    /* 공지사항 */
    .notice-title {
        font-size: 14px;
    }

    /* 섹션 타이틀 */
    .section-title {
        font-size: 16px;
    }

    .dashboard-section-title {
        font-size: 14px;
    }

    /* 모바일 네비 표시 */
    .mobile-nav {
        display: flex !important;
    }
}

/* 모바일 하단 네비게이션 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    z-index: 1000;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.mobile-nav-item-icon {
    font-size: 20px;
}
