/* Reset và cài đặt cơ bản */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f7f9fc;
    font-family: 'Segoe UI', -apple-system, 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 20px;
}

/* Container chung */
.ph-diachi-container {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ph-diachi-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Tiêu đề */
.ph-diachi-title {
    text-align: center;
    color: #1e88e5;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
}

.ph-diachi-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #1e88e5;
    margin: 8px auto 0;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ph-diachi-title:hover::after {
    width: 70px;
}

/* Nhãn và input/select */
.ph-diachi-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #455a64;
    margin-bottom: 6px;
}

.ph-diachi-input,
.ph-diachi-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.ph-diachi-input:focus,
.ph-diachi-select:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.ph-diachi-input {
    margin-bottom: 15px;
}

.ph-diachi-select {
    margin-bottom: 15px;
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 12px;
    cursor: pointer;
}

.ph-diachi-datalist {
    max-height: 150px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 5px;
}

/* Nút Tra cứu */
.ph-diachi-button {
    background-color: #1e88e5;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.ph-diachi-button:hover {
    background-color: #1565c0;
    transform: translateY(-1px);
}

/* Kết quả */
.ph-diachi-result,
.ph-diachi-result-area {
    margin-top: 20px;
}

.ph-diachi-result-box {
    padding: 18px;
    border-radius: 10px;
    background: #e8f5e9;
    border: 1px solid #2e7d32;
    color: #155724;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ph-diachi-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ph-diachi-copy-btn:hover {
    background: #1b5e20;
}

.ph-diachi-error-box {
    padding: 16px;
    border-radius: 10px;
    background: #fff3f3;
    border: 1px solid #c62828;
    color: #721c24;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

/* Responsive design */
@media (max-width: 600px) {
    .ph-diachi-container {
        padding: 20px;
    }

    .ph-diachi-button {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .ph-diachi-result-box,
    .ph-diachi-error-box {
        padding: 15px;
    }
}