@charset "utf-8";

/* ===== Connect Badge in Footer ===== */
.connect-total-count {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 7px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    line-height: 18px;
    vertical-align: middle;
}

/* ===== Current Connect Page Layout ===== */
#current-connect-page {
    padding: 80px 0;
    min-height: 60vh;
}

.connect-header {
    text-align: center;
    margin-bottom: 48px;
}

.connect-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 16px;
}

.connect-count {
    font-size: 16px;
    color: #6B7280;
}

.connect-count strong {
    color: #8B5CF6;
    font-size: 20px;
    font-weight: 700;
}

/* ===== Connect List Container ===== */
.connect-list {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== Connect Item - Single Line Layout ===== */
.connect-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    margin-bottom: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.connect-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

/* Number */
.connect-num {
    flex-shrink: 0;
    width: 40px;
}

.connect-num .num {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
}

/* Country Flag */
.connect-flag {
    flex-shrink: 0;
    width: 32px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connect-flag img {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Info Section - Single Line (Name + Location) */
.connect-info-inline {
    flex: 1;
    min-width: 0;
}

.info-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.info-main .name {
    font-size: 17px;
    font-weight: 600;
    color: #1F2937;
}

.member-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.4;
}

.info-sub {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-sub .location {
    font-size: 14px;
    color: #6B7280;
}

.info-sub .location a {
    color: #8B5CF6;
    text-decoration: none;
    transition: color 0.3s;
}

.info-sub .location a:hover {
    color: #6D28D9;
    text-decoration: underline;
}

/* ===== Action Buttons ===== */
.connect-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #E5E7EB;
    background: #FFF;
    border-radius: 10px;
    color: #6B7280;
    transition: all 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* Info Button - Purple */
.info-btn {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
    color: #8B5CF6;
}

.info-btn:hover {
    border-color: #8B5CF6;
    background: #8B5CF6;
    color: white;
}

/* Message Button - Blue */
.memo-btn {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
    color: #3B82F6;
}

.memo-btn:hover {
    border-color: #3B82F6;
    background: #3B82F6;
    color: white;
}

/* Block Button - Red */
.block-btn {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
    color: #EF4444;
}

.block-btn:hover {
    border-color: #EF4444;
    background: #EF4444;
    color: white;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 100px 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 16px;
}

/* ===== IP Detail Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    font-size: 28px;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #EF4444;
    color: white;
}

.modal-body {
    padding: 32px;
}

/* IP Info Grid */
.ip-info-grid {
    display: grid;
    gap: 20px;
}

.ip-info-item {
    display: flex;
    align-items: start;
    gap: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
}

.ip-info-item .label {
    flex-shrink: 0;
    width: 120px;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
}

.ip-info-item .value {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1F2937;
    word-break: break-all;
}

/* Modal Footer - Block Buttons */
.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.block-full-btn,
.block-range-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.block-full-btn {
    background: #EF4444;
    color: white;
}

.block-full-btn:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.block-range-btn {
    background: #F97316;
    color: white;
}

.block-range-btn:hover {
    background: #EA580C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

#ip-range-text {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    opacity: 0.9;
}

/* ===== Dark Mode Support ===== */
body.dark-mode #current-connect-page {
    background: #0F172A;
}

body.dark-mode .connect-header h1 {
    color: #E5E7EB;
}

body.dark-mode .connect-count {
    color: #9CA3AF;
}

body.dark-mode .connect-item {
    background: #1E293B;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .connect-item:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

body.dark-mode .connect-num .num {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

body.dark-mode .info-main .name {
    color: #E5E7EB;
}

body.dark-mode .info-sub .location {
    color: #9CA3AF;
}

body.dark-mode .action-btn {
    background: #0F172A;
    border-color: #334155;
}

body.dark-mode .info-btn {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .memo-btn {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .block-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .modal-content {
    background: #1E293B;
}

body.dark-mode .modal-header {
    border-bottom-color: #334155;
}

body.dark-mode .modal-header h3 {
    color: #E5E7EB;
}

body.dark-mode .modal-body {
    background: #1E293B;
}

body.dark-mode .ip-info-item {
    background: #0F172A;
}

body.dark-mode .ip-info-item .label {
    color: #9CA3AF;
}

body.dark-mode .ip-info-item .value {
    color: #E5E7EB;
}

body.dark-mode .modal-footer {
    border-top-color: #334155;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    #current-connect-page {
        padding: 60px 20px;
    }

    .connect-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px;
    }

    .connect-num {
        width: 35px;
    }

    .connect-num .num {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 12px;
    }

    .connect-flag {
        width: 28px;
        height: 21px;
    }

    .connect-flag img {
        width: 28px;
        height: 21px;
    }

    .connect-info-inline {
        flex: 1 1 100%;
        order: 3;
    }

    .connect-actions {
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .action-btn {
        width: 40px;
        height: 40px;
    }

    .modal-content {
        width: 95%;
    }

    .modal-header {
        padding: 20px 24px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .modal-body {
        padding: 24px;
    }

    .ip-info-item {
        flex-direction: column;
        gap: 8px;
    }

    .ip-info-item .label {
        width: 100%;
    }

    .modal-footer {
        flex-direction: column;
        padding: 20px 24px;
    }

    .block-full-btn,
    .block-range-btn {
        width: 100%;
        justify-content: center;
    }
}
