:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-input: rgba(15, 23, 42, 0.6);
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #94a3b8;
    
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-shadow: rgba(59, 130, 246, 0.15);
    
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    --accent-light: rgba(139, 92, 246, 0.1);
    
    --glass-background: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.notice-wrapper {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    padding-top: 10px !important;
}

.notice-wrapper::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: gradientMove 15s ease-in-out infinite alternate;
}

@keyframes gradientMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(5%, 5%);
    }
}

.notice-container {
    width: 100%;
    margin-top: 1rem;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notice-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px -1px rgba(0, 0, 0, 0.15),
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* 헤더 스타일 */
.notice-header {
    width: 100%;
    padding: 1.25rem 2rem 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--accent);
    background: linear-gradient(to right, var(--accent-light), transparent);
}

.notice-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    text-shadow: 0 0 20px var(--accent);
}

.notice-title::before {
    content: '📢';
    font-size: 1.875rem;
    line-height: 1;
    margin-right: 0.75rem;
}

.notice-description {
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1.2;
    margin-left: 1rem;
    padding-top: 0.5rem;
    font-weight: 600;
}

/* 컨트롤 영역 */
.notice-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.board-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.total-count {
    font-weight: 600;
}

.board-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-write {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-write:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.btn-write:active {
    transform: translateY(0);
}

/* 테이블 스타일 */
.notice-list {
    padding: 1rem 2rem;
}

.notice-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.5rem;
    overflow: hidden;
}

.notice-table thead {
    background: rgba(139, 92, 246, 0.1);
}

.notice-table th {
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-primary);
    font-size: 0.9rem;
}

.notice-table tbody tr {
    border-bottom: 1px solid var(--border-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.notice-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: translateX(4px);
}

.notice-table tbody tr:last-child {
    border-bottom: none;
}

.notice-table td {
    padding: 1rem 0.75rem;
    text-align: center;
    vertical-align: middle;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.col-num { width: 80px; }
.col-title { text-align: left; }
.col-author { width: 120px; }
.col-date { width: 120px; }
.col-views { width: 80px; }
.col-actions { width: 100px; }

.notice-title-cell {
    text-align: left;
}

.title-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-text {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
}

.notice-table tbody tr:hover .title-text {
    color: var(--accent);
}

.important-badge {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.new-badge {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

/* 액션 버튼 스타일 */
.notice-actions {
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: transparent;
    border: 1px solid var(--border-primary);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.edit-btn {
    color: var(--primary);
    border-color: var(--primary);
}

.edit-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 8px var(--primary-shadow);
}

.delete-btn {
    color: #ef4444;
    border-color: #ef4444;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* 빈 상태 */
.empty-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-text h3 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.empty-text p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* 페이지네이션 */
.notice-pagination {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-primary);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-primary);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-btn.prev,
.page-btn.next {
    font-weight: 600;
}

/* 작성 폼 */
.write-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.write-form-container.hidden {
    display: none;
}

.write-form {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.form-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* 폼 스타일 */
.notice-form {
    padding: 2rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

.input-field,
.textarea-field {
    position: relative;
}

.input-field i,
.textarea-field i {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-tertiary);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.input-field input,
.textarea-field textarea {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.textarea-field textarea {
    min-height: 200px;
    resize: vertical;
    padding-top: 1rem;
}

.input-field input:hover,
.textarea-field textarea:hover {
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 1px var(--accent-light);
}

.input-field input:focus,
.textarea-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(30, 41, 59, 1);
    box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-light);
}

.input-field input:focus + i,
.textarea-field textarea:focus + i {
    color: var(--accent);
}

.input-field input::placeholder,
.textarea-field textarea::placeholder {
    color: var(--text-tertiary);
}

/* 체크박스 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: var(--accent);
}

.checkbox-text {
    font-weight: 500;
}

/* 이미지 업로드 스타일 */
.image-upload-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-upload-field input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: rgba(24, 28, 42, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-field input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 213, 0.1);
}

.image-upload-field input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 255, 213, 0.2);
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: rgba(24, 28, 42, 0.5);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.image-preview-remove:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* 리치 에디터 스타일 */
.rich-editor-container {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(24, 28, 42, 0.3);
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(24, 28, 42, 0.5);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(24, 28, 42, 0.8);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: var(--primary-color);
    color: var(--background-dark);
    border-color: var(--primary-color);
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.rich-editor {
    min-height: 300px;
    padding: 1rem;
    outline: none;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9rem;
    overflow-y: auto;
}

.rich-editor:empty:before {
    content: attr(placeholder);
    color: var(--text-secondary);
    pointer-events: none;
}

.rich-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rich-editor p {
    margin: 0.5rem 0;
}

.rich-editor strong {
    font-weight: 600;
    color: var(--text-primary);
}

.rich-editor em {
    font-style: italic;
}

.rich-editor u {
    text-decoration: underline;
}

/* 드래그 앤 드롭 스타일 */
.rich-editor.drag-over {
    border: 2px dashed var(--primary-color) !important;
    background: rgba(0, 255, 213, 0.1) !important;
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.3) !important;
}

.rich-editor.drag-over::after {
    content: "이미지를 여기에 놓으세요";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-background);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

/* 이미지 업로드 모달 */
.image-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    backdrop-filter: blur(4px);
}

.image-upload-modal.hidden {
    display: none;
}

.image-upload-container {
    width: 90%;
    max-width: 500px;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.image-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.image-upload-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-upload-content {
    padding: 2rem;
}

.image-upload-field {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: rgba(24, 28, 42, 0.3);
    transition: all 0.3s ease;
}

.image-upload-field:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 213, 0.1);
}

.image-upload-field input[type="file"] {
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.image-upload-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.image-upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-primary);
}

/* 폼 액션 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.btn-cancel,
.btn-submit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: var(--text-tertiary);
    color: white;
}

.btn-cancel:hover {
    background: var(--text-secondary);
    transform: translateY(-1px);
}

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

.btn-submit:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

/* 반응형 */
@media (max-width: 1024px) {
    .notice-wrapper {
        padding: 1rem;
    }
    
    .notice-container {
        margin-top: 0.5rem;
    }
}

/* 비밀번호 모달 스타일 */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.password-modal.hidden {
    display: none;
}

.password-container {
    width: 90%;
    max-width: 400px;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.password-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-title i {
    color: var(--accent);
}

.password-form {
    padding: 2rem;
}

.password-form .input-group {
    margin-bottom: 1.5rem;
}

.password-form .form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

@media (max-width: 768px) {
    .notice-wrapper {
        padding: 0.5rem;
    }
    
    .notice-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .notice-title {
        font-size: 1.1rem;
    }
    
    .notice-title::before {
        font-size: 1.5rem;
    }
    
    .notice-description {
        margin-left: 0;
        font-size: 0.85rem;
    }
    
    .notice-controls {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .board-actions {
        justify-content: center;
    }
    
    .notice-list {
        padding: 1rem;
    }
    
    .notice-table {
        font-size: 0.8rem;
    }
    
    .col-author,
    .col-views {
        display: none;
    }
    
    .notice-table th,
    .notice-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .write-form {
        width: 95%;
        margin: 1rem;
    }
    
    .form-header,
    .notice-form {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
    
    .password-container {
        width: 95%;
        margin: 1rem;
    }
    
    .password-header,
    .password-form {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .notice-wrapper {
        padding: 0.25rem;
    }
    
    .notice-header {
        padding: 0.75rem;
    }
    
    .notice-title {
        font-size: 1rem;
    }
    
    .notice-controls {
        padding: 0.75rem;
    }
    
    .notice-list {
        padding: 0.75rem;
    }
    
    .notice-table th,
    .notice-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .important-badge,
    .new-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
    
    .password-container {
        width: 98%;
        margin: 0.5rem;
    }
    
    .password-header,
    .password-form {
        padding: 0.75rem;
    }
}

/* 반응형 통합: PC/모바일 요소 표시/숨김 제어 */
@media (max-width: 767px) {
    .pc-notice {
        display: none !important;
    }
    
    .mobile-notice-container {
        display: block;
    }
}

@media (min-width: 768px) {
    .mobile-notice-container {
        display: none !important;
    }
    
    .pc-notice {
        display: block;
    }
} 