/* --- Global --- */
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}

/* --- Header & Footer handled separately --- */

/* --- Home Page --- */
.title {
    text-align: center;
    margin: 20px 0;
    color: #0b74ff;
}

.ip-box {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.ip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: 0.2s;
    background: #f5faff;
}

.ip-row:hover {
    background: #fbf1ff;
}

/* Details structure */
.ip-details {
    display: flex;
    flex-direction: column; /* vertical: label+IP first line, location next line */
    gap: 4px;
}

/* label + value inline */
.ip-label-value {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
}

.ip-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #333;
}

.ip-flag {
    display: none;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

.ip-row strong {
    font-weight: 700;
    color: #0b74ff;
}

.copy-ip-btn {
    padding: 4px 8px;
    background: #0b74ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.copy-ip-btn:hover {
    background: #065cb5;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

#switch-ip-info-btn {
    padding: 5px 10px;
    background: #0b74ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

#switch-ip-info-btn:hover {
    background: #065cb5;
}

.ip-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.info-row {
    flex: 1 1 45%;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-weight: 700;
}

.copy-value-btn {
    padding: 4px 6px;
    background: #b0c0d6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.copy-value-btn:hover {
    background: #065cb5;
}

/* --- Responsive --- */
@media(max-width:700px){
    .info-row {
        flex: 1 1 100%;
    }
    .ip-row {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    .info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
