/* ========== 전체 레이아웃 ========== */
.ruc-checker {
    max-width: 700px;
    margin: 30px auto;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ruc-checker h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ========== 폼 스타일 ========== */
.ruc-form {
    padding: 25px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ruc-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ruc-form input[type="url"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    min-width: 0;
}

.ruc-form input[type="url"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ruc-form select {
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.ruc-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ruc-form button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ruc-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ruc-form button:active {
    transform: translateY(0);
}

/* ========== 결과 영역 ========== */
.ruc-result {
    margin: 0;
    padding: 20px 25px;
    background: white;
    border-top: 1px solid #e1e5e9;
}

.ruc-result:empty {
    display: none;
}

.ruc-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ruc-success::before {
    content: "✓";
    font-weight: bold;
    font-size: 16px;
}

.ruc-warning {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ruc-warning::before {
    content: "⚠";
    font-weight: bold;
    font-size: 16px;
}

.ruc-error {
    background: linear-gradient(135deg, #ff416c 0%, #ff4757 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ruc-error::before {
    content: "✕";
    font-weight: bold;
    font-size: 16px;
}

.ruc-terminal {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #2ecc71;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    padding: 20px;
    border-radius: 8px;
    white-space: pre-wrap;
    line-height: 1.6;
    overflow-x: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ruc-terminal strong {
    color: #f39c12;
}

/* ========== 관리자 페이지 스타일 ========== */
.wrap .card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.wrap .card h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 20px 25px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: none;
}

.wrap .card > p {
    padding: 0 25px;
    margin: 20px 0;
    color: #666;
    line-height: 1.5;
}

.form-table {
    margin: 0;
    padding: 25px;
    background: #f8f9fa;
}

.form-table th {
    padding: 15px 0;
    width: 150px;
    font-weight: 600;
    color: #333;
}

.form-table td {
    padding: 15px 0;
}

.form-table input[type="url"] {
    padding: 10px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.form-table input[type="url"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========== 테이블 스타일 ========== */
.wp-list-table {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 25px 25px 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wp-list-table thead th {
    background: #f1f3f4;
    border-bottom: 2px solid #e1e5e9;
    padding: 15px 12px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wp-list-table tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.wp-list-table tbody tr:hover {
    background-color: #f8f9fa;
}

.wp-list-table td {
    padding: 15px 12px;
    vertical-align: middle;
    font-size: 14px;
}

/* ========== 버튼 스타일 ========== */
.button {
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 10px 20px !important;
}

.button-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.button-secondary {
    background: #f8f9fa !important;
    color: #667eea !important;
    border: 2px solid #e1e5e9 !important;
    padding: 8px 16px !important;
}

.button-secondary:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.check-redirect {
    background: linear-gradient(135deg, #48cae4 0%, #0077b6 100%) !important;
    color: white !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
}

.check-redirect:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3) !important;
}

.button-link-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
    color: white !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.button-link-delete:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
}

.delete-single-url {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.delete-single-url:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
    text-decoration: none !important;
}

/* ========== 체크박스 스타일 ========== */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

/* ========== 알림 스타일 ========== */
.notice {
    border-left: 4px solid #667eea !important;
    background: white !important;
    border-radius: 0 8px 8px 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin: 20px 0 !important;
}

.notice-success {
    border-left-color: #2ecc71 !important;
}

.notice-error {
    border-left-color: #e74c3c !important;
}

.notice p {
    font-weight: 500 !important;
}

/* ========== 반응형 디자인 ========== */
@media (max-width: 768px) {
    .ruc-checker {
        margin: 15px;
        border-radius: 8px;
    }

    .ruc-form {
        padding: 20px;
    }

    .ruc-form-row {
        flex-direction: column;
        gap: 10px;
    }

    .ruc-form input[type="url"],
    .ruc-form select,
    .ruc-form button {
        width: 100%;
    }

    .ruc-terminal {
        font-size: 11px;
        padding: 15px;
    }

    .wrap .card {
        margin: 15px;
        border-radius: 8px;
    }

    .wp-list-table {
        margin: 0 15px 15px 15px;
        font-size: 12px;
    }

    .wp-list-table th,
    .wp-list-table td {
        padding: 10px 8px;
    }

    .form-table {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .ruc-checker h3 {
        font-size: 16px;
        padding: 15px 20px;
    }

    .ruc-form {
        padding: 15px;
    }

    .ruc-result {
        padding: 15px 20px;
    }

    .wrap .card h2 {
        font-size: 15px;
        padding: 15px 20px;
    }

    .wp-list-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ========== 로딩 애니메이션 ========== */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.ruc-terminal:has-text("Loading") {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========== 스크롤바 스타일 ========== */
.ruc-terminal::-webkit-scrollbar {
    height: 8px;
}

.ruc-terminal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ruc-terminal::-webkit-scrollbar-thumb {
    background: rgba(46, 204, 113, 0.3);
    border-radius: 4px;
}

.ruc-terminal::-webkit-scrollbar-thumb:hover {
    background: rgba(46, 204, 113, 0.5);
}