@charset "utf-8";

/* Biscrow Dark Theme Variables */
:root {
    --bs-primary: #1a1a2e;
    --bs-secondary: #16213e;
    --bs-dark: #0f0f23;
    --bs-light: #2a2a3e;
    --bs-info: #00d4ff;
    --bs-success: #4ecdc4;
    --bs-warning: #ffd700;
    --bs-danger: #ff4757;
    --bs-muted: #888;
    --bs-white: #ffffff;
    --bs-gray: #aaa;
    --bs-border: #3a3a5e;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-success: linear-gradient(135deg, #4ecdc4 0%, #3aa39f 100%);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 212, 255, 0.2);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    background: var(--bs-dark) !important;
    color: var(--bs-white) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Common Card Style */
.biscrow-card {
    background: var(--gradient-dark);
    border: 1px solid var(--bs-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

/* Form Controls */
.form-control,
.form-select {
    background: rgba(42, 42, 62, 0.5) !important;
    border: 2px solid transparent;
    color: var(--bs-white) !important;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    background: rgba(22, 33, 62, 0.8) !important;
    border-color: var(--bs-info);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    outline: none;
}

.form-control::placeholder {
    color: var(--bs-muted) !important;
}

/* Buttons */
.btn-biscrow {
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-primary-biscrow {
    background: var(--gradient-primary);
    color: var(--bs-white);
}

.btn-primary-biscrow:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary-biscrow {
    background: transparent;
    border: 2px solid var(--bs-info);
    color: var(--bs-info);
}

.btn-secondary-biscrow:hover {
    background: var(--bs-info);
    color: var(--bs-dark);
}

.btn-success-biscrow {
    background: var(--gradient-success);
    color: var(--bs-white);
}

.btn-danger-biscrow {
    background: linear-gradient(135deg, var(--bs-danger) 0%, #d63447 100%);
    color: var(--bs-white);
}

/* Tables */
.table-biscrow {
    background: var(--bs-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-biscrow table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.table-biscrow th {
    background: var(--bs-primary);
    color: var(--bs-white);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid var(--bs-border);
}

.table-biscrow td {
    padding: 1rem;
    color: var(--bs-white);
    border-bottom: 1px solid var(--bs-border);
}

.table-biscrow tr:last-child td {
    border-bottom: none;
}

/* List Groups */
.list-group-item {
    background: var(--bs-secondary);
    border: 1px solid var(--bs-border);
    color: var(--bs-white);
    transition: var(--transition);
}

.list-group-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--bs-info);
}

/* Alerts */
.alert-biscrow {
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.alert-info-biscrow {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--bs-info);
    color: var(--bs-white);
}

.alert-success-biscrow {
    background: rgba(78, 205, 196, 0.1);
    border-color: var(--bs-success);
    color: var(--bs-white);
}

.alert-danger-biscrow {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--bs-danger);
    color: var(--bs-white);
}

/* Modal Styles */
.modal-biscrow {
    background: rgba(15, 15, 35, 0.9);
}

.modal-content-biscrow {
    background: var(--gradient-dark);
    border: 1px solid var(--bs-border);
    border-radius: 20px;
    color: var(--bs-white);
}

.modal-header-biscrow {
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid var(--bs-border);
    padding: 1.5rem;
}

.modal-title-biscrow {
    color: var(--bs-info);
    font-weight: 600;
}

/* Badges */
.badge-biscrow {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-info-biscrow {
    background: var(--gradient-primary);
    color: var(--bs-white);
}

.badge-success-biscrow {
    background: var(--gradient-success);
    color: var(--bs-white);
}

/* Progress Bars */
.progress-biscrow {
    background: var(--bs-secondary);
    border-radius: 10px;
    height: 1.5rem;
    overflow: hidden;
}

.progress-bar-biscrow {
    background: var(--gradient-primary);
    height: 100%;
    transition: width 0.6s ease;
}

/* Tooltips */
.tooltip-biscrow {
    background: var(--bs-primary);
    color: var(--bs-white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bs-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-info);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0099cc;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    }
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .biscrow-card {
        border-radius: 15px;
    }
    
    .btn-biscrow {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .table-biscrow th,
    .table-biscrow td {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 0.95rem;
    }
    
    .btn-biscrow {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Member Skin Specific */
.register .list-group-item {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    border-right: 0;
    background: transparent;
    border-color: var(--bs-border);
}

@media all and (max-width:575px) {
    .register .list-group-item {
        padding-left: 1.0rem;
        padding-right: 1.0rem;
    }
}

/* Popup Windows */
#topNav {
    background: var(--gradient-dark) !important;
    border-bottom: 1px solid var(--bs-border);
}

#topNav h5 {
    color: var(--bs-white);
    font-weight: 600;
}

#topNav .close {
    color: var(--bs-white);
    opacity: 0.8;
    transition: var(--transition);
}

#topNav .close:hover {
    opacity: 1;
    transform: rotate(90deg);
}
/* 텔레그램 스타일 메신저 */
.messenger-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.messenger-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #0e0e0e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* 좌측 채팅 목록 */
.chat-list-container {
    width: 350px;
    background: #17212b;
    border-right: 1px solid #0e1621;
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    background: #232e3c;
    padding: 15px 20px;
    border-bottom: 1px solid #0e1621;
}

.chat-list-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.chat-search {
    padding: 10px 15px;
    background: #242f3d;
    border-bottom: 1px solid #0e1621;
}

.chat-search input {
    width: 100%;
    background: #17212b;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
}

.chat-search input::placeholder {
    color: #7d8b98;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.chat-item:hover {
    background: #2b5278;
}

.chat-item.active {
    background: #2b5278;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #00d4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #0f0f23;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.chat-name {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-time {
    font-size: 13px;
    color: #7d8b98;
}

.chat-preview {
    color: #7d8b98;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: #00d4ff;
    color: #0f0f23;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* 우측 채팅창 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0e1621;
}

.chat-header {
    background: #17212b;
    padding: 15px 20px;
    border-bottom: 1px solid #0e1621;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00d4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #0f0f23;
    margin-right: 12px;
}

.chat-header-name {
    color: #ffffff;
    font-weight: 500;
}

.chat-header-status {
    color: #7d8b98;
    font-size: 13px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.message-date {
    text-align: center;
    margin: 20px 0;
    color: #7d8b98;
    font-size: 13px;
}

.message {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-end;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.message.received .message-content {
    background: #182533;
    color: #ffffff;
    border-bottom-left-radius: 5px;
}

.message.sent .message-content {
    background: #2b5278;
    color: #ffffff;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 11px;
    color: #7d8b98;
    margin-top: 5px;
}

.message-image {
    max-width: 300px;
    border-radius: 10px;
    cursor: pointer;
}

.message-file {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 5px;
}

.message-file i {
    margin-right: 8px;
    color: #00d4ff;
}

/* 메시지 입력창 */
.chat-input-container {
    background: #17212b;
    padding: 15px 20px;
    border-top: 1px solid #0e1621;
}

.chat-input-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input-wrapper {
    flex: 1;
    background: #2b5278;
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 5px 5px 5px 20px;
}

.chat-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 15px;
    padding: 10px 0;
    max-height: 120px;
    resize: none;
    outline: none;
}

.chat-input::placeholder {
    color: #7d8b98;
}

.btn-attach {
    background: none;
    border: none;
    color: #7d8b98;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-attach:hover {
    color: #00d4ff;
}

.btn-send {
    background: #00d4ff;
    border: none;
    color: #0f0f23;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover {
    background: #0099cc;
    transform: scale(1.1);
}

/* 채팅 없을 때 */
.no-chat {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #7d8b98;
}

.no-chat i {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* 이미지 모달 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-modal-close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.image-modal-close:hover {
    color: #00d4ff;
}

/* 파일 업로드 미리보기 */
.file-upload-preview {
    background: #17212b;
    border-bottom: 1px solid #0e1621;
    padding: 10px 20px;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.file-upload-preview.show {
    display: block;
}

.file-preview-item {
    display: inline-block;
    position: relative;
    margin-right: 10px;
    margin-bottom: 10px;
}

.file-preview-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #2b5278;
}

.file-preview-doc {
    width: 150px;
    height: 150px;
    background: #2b5278;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.file-preview-doc i {
    font-size: 40px;
    color: #00d4ff;
    margin-bottom: 10px;
}

.file-preview-doc span {
    font-size: 12px;
    word-break: break-all;
}

.file-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: #ffffff;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.file-preview-remove:hover {
    background: #ff3838;
    transform: scale(1.1);
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2b5278;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a6a9a;
}

/* 반응형 */
@media (max-width: 768px) {
    .messenger-container {
        height: calc(100vh - 150px);
    }
    
    .chat-list-container {
        width: 80px;
    }
    
    .chat-list-header,
    .chat-search,
    .chat-info {
        display: none;
    }
    
    .chat-item {
        justify-content: center;
        padding: 15px;
    }
    
    .chat-avatar {
        margin: 0;
    }
    
    .unread-badge {
        position: absolute;
        right: 15px;
        top: 10px;
        bottom: auto;
    }
}