@charset "utf-8";

/* ========================================
   SW_UP 위젯 게시판 스킨
   ======================================== */

/* 전투기 UI 스타일 원형 애니메이션 */
.sw_radar_container {
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background: transparent;
    border-radius: 8px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    overflow: visible;
    pointer-events: none;
}

.sw_radar_wrapper {
    pointer-events: auto;
}

.sw_radar_wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
}

.sw_radar_circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

/* 회전 애니메이션 */
.sw_radar_outer_dashed {
    animation: rotate-clockwise 20s linear infinite;
}

.sw_radar_mid_solid {
    animation: rotate-counter-clockwise 15s linear infinite;
}

.sw_radar_inner_dashed {
    animation: rotate-clockwise 12s linear infinite;
}

.sw_radar_arc1 {
    animation: rotate-clockwise 18s linear infinite;
}

.sw_radar_arc2 {
    animation: rotate-counter-clockwise 16s linear infinite;
}

.sw_radar_arc3 {
    animation: rotate-clockwise 14s linear infinite;
}

.sw_radar_arc4 {
    animation: rotate-counter-clockwise 13s linear infinite;
}

@keyframes rotate-clockwise {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotate-counter-clockwise {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

/* 중심 바이너리 코드 */
.sw_radar_center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.sw_binary_code {
    color: var(--card-bg-color);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* 주변 바이너리 라벨 */
.sw_binary_label {
    position: absolute;
    color: var(--card-bg-color);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 5;
    opacity: 0.5;
}

.sw_binary_top {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.sw_binary_top_right {
    top: 15%;
    right: 15%;
}

.sw_binary_right {
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

.sw_binary_bottom {
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.sw_binary_left {
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

.sw_binary_top_left {
    top: 15%;
    left: 15%;
}

/* 코너 C 모양 */
.sw_radar_corner {
    position: absolute;
    width: 80px;
    height: 80px;
    z-index: 5;
}

.sw_corner_top_right {
    top: 0;
    right: 0;
}

.sw_corner_bottom_left {
    bottom: 0;
    left: 0;
}

/* 위젯 게시판 컨테이너 */
.sw_widget_container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 게시판 헤더 */
.sw_board_header {
    margin-bottom: 20px;
}

.sw_board_title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--content-font-color);
    font-family: var(--f-pre);
    margin: 0;
    padding: 0;
}

/* 위젯 영역 */
.sw_widget_area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 위젯 아이템 */
.sw_widget_item {
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: var(--card-border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.sw_widget_item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 위젯 컨텐츠 */
.sw_widget_content {
    color: var(--content-font-color);
    font-family: var(--content-font-family);
    font-size: var(--content-font-size);
    line-height: 1.6;
    word-break: break-word;
}

/* 상세보기 스타일 */
.sw_widget_view_container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.sw_view_header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border-color);
}

.sw_view_title {
    font-size: 2em;
    font-weight: 600;
    color: var(--content-font-color);
    font-family: var(--f-pre);
    margin: 0;
}

.sw_view_content {
    min-height: 200px;
    padding: 30px 0;
    color: var(--content-font-color);
    font-family: var(--content-font-family);
    font-size: var(--content-font-size);
    line-height: 1.8;
    word-break: break-word;
}

.sw_view_buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border-color);
}

.sw_btn_list,
.sw_btn_update,
.sw_btn_delete {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--f-pre);
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.sw_btn_list {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.sw_btn_update {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.sw_btn_delete {
    background: var(--error-color);
    color: var(--white);
}

/* 작성/수정 스타일 */
.sw_widget_write_container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.sw_write_field {
    margin-bottom: 25px;
}

.sw_write_label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--content-font-color);
    font-family: var(--f-pre);
    font-size: 14px;
}

.sw_write_input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--card-border-color);
    border-radius: 4px;
    font-family: var(--content-font-family);
    font-size: var(--content-font-size);
    color: var(--content-font-color);
    background: var(--card-bg-color);
    box-sizing: border-box;
}

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

.sw_write_buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border-color);
}

.sw_btn_submit,
.sw_btn_cancel {
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--f-pre);
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.sw_btn_submit {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.sw_btn_cancel {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

/* 눈금자 위젯 */
.sw_ruler_container {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 100;
}

.sw_ruler_widget {
    position: relative;
    width: 100%;
    height: 100px;
}

.sw_ruler_svg {
    width: 100%;
    height: 100px;
    display: block;
}

/* 네비게이터 */
.sw_navigator {
    position: absolute;
    top: -20px; /* 눈금자 기준 10px 위 (눈금자 높이 100px의 절반인 50px - 10px = 40px) */
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sw_nav_item {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-bg-color);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    text-decoration: none;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s;
    pointer-events: auto;
    word-break: keep-all;
    white-space: nowrap;
    overflow: visible;
    padding: 0 5px;
}

.sw_nav_item:hover {
    opacity: 1;
    color: var(--card-bg-color);
}

/* 반응형 */
@media (max-width: 768px) {
    .sw_radar_container {
        max-width: 90vw;
        padding: 20px;
        top: 40%;
    }
    
    .sw_ruler_container {
        width: 85%;
        bottom: 15%;
    }
    
    .sw_ruler_widget {
        height: 60px;
    }
    
    .sw_ruler_svg {
        height: 60px;
    }
    
    .sw_navigator {
        height: 20px;
        top: -10px; /* 눈금자 기준 10px 위 (눈금자 높이 60px의 절반인 30px - 10px = 20px, 여유를 위해 30px) */
    }
    
    .sw_nav_item {
        font-size: 9px;
    }
    
    .sw_widget_area {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sw_widget_container,
    .sw_widget_view_container,
    .sw_widget_write_container {
        padding: 15px;
    }
    
    .sw_view_title {
        font-size: 1.5em;
    }
}

