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

:root {
    --primary-color: #1e88e5;
    --secondary-color: #1565c0;
    --danger-color: #1e88e5;
    --success-color: #1e88e5;
    --warning-color: #1e88e5;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-color: rgba(30, 136, 229, 0.1);
    --gradient-primary: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    --gradient-success: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    --gradient-info: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    --gradient-warning: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    --gradient-danger: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    --gradient-purple: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    --gradient-brown: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* 헤더 섹션 */
.header-section {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    text-align: center;
    position: sticky;
    top: 2rem;
}

.title-section h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.title-section p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* 메인 컨텐츠 영역 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
}

.sections-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* 컨텐츠 섹션 */
.content-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* QR 섹션 */
.qr-section {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-container {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.qr-code img {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-text {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

/* 다운로드 버튼 */
.download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

/* 다운로드 링크 */
.download-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.3);
}

.download-link i {
    font-size: 1.2rem;
}

/* 섹션 제목 */
.section-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    font-size: 1.5rem;
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--shadow-color);
}

.section-header .section-title {
    margin-bottom: 0;
    border-bottom: none;
}

/* 버튼 그리드 */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* 주요 기능과 디스플레이 화면 섹션의 버튼 그리드 */
.sections-container .button-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* 관리 섹션의 버튼 그리드 */
.manage-section .button-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    grid-template-columns: unset;
}

/* 네비게이션 버튼 */
.nav-button {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    border-radius: 1rem;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    transition: all 0.3s ease;
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.nav-button:hover::before {
    background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
}

.nav-button .icon {
    width: 3rem;
    height: 3rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.8rem;
    font-size: 1.4rem;
}

/* 주요 기능과 디스플레이 화면 버튼 */
.sections-container .nav-button {
    background: var(--gradient-primary);
    padding: 2.3rem 1.5rem;
    min-height: 156px;
    width: 100%;
}

.sections-container .nav-button .icon {
    width: 5.2rem;
    height: 5.2rem;
    margin-right: 2rem;
    font-size: 2.3rem;
}

.sections-container .nav-button span {
    font-size: 1.5rem;
    font-weight: 500;
}

/* 삭제 버튼 */
.nav-button.delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    min-width: 169px;
    width: 169px;
    flex: 0 0 169px;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    border: none;
    cursor: pointer;
}

.nav-button.delete .icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.4rem;
    font-size: 0.8rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.4rem;
}

.nav-button.delete span {
    font-size: 0.85rem;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.4rem;
    flex: 1;
    text-align: left;
}

.nav-button.delete:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    transform: translateY(-1px);
}

/* 스위치 스타일 */
.status-switch {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    width: 100%;
    max-width: 300px;
}

.switch-label {
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 500;
    text-align: center;
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-color);
    min-width: 60px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 68px;
    margin: 0 auto;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 68px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 52px;
    width: 52px;
    left: 8px;
    bottom: 8px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(52px);
}

.slider.round {
    border-radius: 68px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 반응형 디자인 */
@media (max-width: 1600px) {
    .container {
        max-width: 1400px;
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
    }

    .header-section {
        position: static;
        margin-bottom: 2rem;
    }

    .sections-container {
        grid-template-columns: 1fr;
    }

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

    .manage-section .button-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.3rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        grid-template-columns: unset;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .content-section {
        padding: 1rem;
    }

    .sections-container .button-grid {
        grid-template-columns: 1fr;
    }

    .status-switch {
        padding: 0.5rem;
    }
    
    .switch-label {
        font-size: 1.2rem;
    }

    .switch {
        width: 100px;
        height: 56px;
    }

    .slider:before {
        height: 44px;
        width: 44px;
        left: 6px;
        bottom: 6px;
    }

    input:checked + .slider:before {
        transform: translateX(44px);
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    .manage-section .button-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        grid-template-columns: unset;
    }
    
    .nav-button.delete {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        height: 2.3rem;
        min-width: 156px;
        width: 156px;
        flex: 0 0 156px;
    }
    
    .nav-button.delete .icon {
        width: 1.4rem;
        height: 1.4rem;
        font-size: 0.75rem;
        margin-right: 0.3rem;
    }
    
    .nav-button.delete span {
        font-size: 0.8rem;
        padding-right: 0.3rem;
    }

    .sections-container .nav-button {
        padding: 1.8rem 1.2rem;
        min-height: 120px;
    }

    .sections-container .nav-button .icon {
        width: 4rem;
        height: 4rem;
        margin-right: 1.5rem;
        font-size: 1.8rem;
    }

    .sections-container .nav-button span {
        font-size: 1.2rem;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nav-button {
    animation: fadeIn 0.3s ease;
}

.nav-button {
    animation: fadeIn 0.3s ease;
}

/* 팝업 스타일 */
.confirm-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    min-width: 300px;
}

.confirm-popup .icon {
    width: 3rem;
    height: 3rem;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.confirm-popup .message {
    font-size: 1.2rem;
    color: var(--text-color);
    text-align: center;
    font-weight: 500;
}

/* 삭제 팝업 */
.delete-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.delete-popup-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.delete-popup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.delete-popup-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.delete-popup-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.4rem;
}

.delete-popup-message {
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.delete-popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.delete-popup-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-popup-button.cancel {
    background: var(--light-gray);
    color: var(--text-color);
}

.delete-popup-button.confirm {
    background: var(--gradient-primary);
    color: white;
}

.delete-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .delete-popup-content {
        padding: 1.5rem;
        width: 95%;
    }

    .delete-popup-header h3 {
        font-size: 1.2rem;
    }

    .delete-popup-message {
        font-size: 1rem;
    }

    .delete-popup-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
} 